Ensure the premature garbage collection prevention parameter (pgcpp) is generated for Java wrappers

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9943 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2007-09-19 23:17:50 +00:00
commit 7199cf2ef0
10 changed files with 156 additions and 18 deletions

View file

@ -168,12 +168,7 @@ void SwigType_push(SwigType *t, String *cons) {
}
/* -----------------------------------------------------------------------------
* SwigType_ispointer()
* SwigType_ispointer_return()
* SwigType_isarray()
* SwigType_isreference()
* SwigType_isfunction()
* SwigType_isqualifier()
*
* Testing functions for querying a raw datatype
* ----------------------------------------------------------------------------- */

View file

@ -140,6 +140,7 @@ extern "C" {
extern int SwigType_isreference(SwigType *t);
extern int SwigType_isreference_return(SwigType *t);
extern int SwigType_isarray(SwigType *t);
extern int SwigType_prefix_is_simple_1D_array(SwigType *t);
extern int SwigType_isfunction(SwigType *t);
extern int SwigType_isqualifier(SwigType *t);
extern int SwigType_isconst(SwigType *t);

View file

@ -556,6 +556,23 @@ int SwigType_isarray(SwigType *t) {
}
return 0;
}
/*
* SwigType_prefix_is_simple_1D_array
*
* Determine if the type is a 1D array type that is treated as a pointer within SWIG
* eg Foo[], Foo[3] return true, but Foo[3][3], Foo*[], Foo*[3], Foo**[] return false
*/
int SwigType_prefix_is_simple_1D_array(SwigType *t) {
char *c = Char(t);
if (c && (strncmp(c, "a(", 2) == 0)) {
c = strchr(c, '.');
c++;
return (*c == 0);
}
return 0;
}
/* Remove all arrays */
SwigType *SwigType_pop_arrays(SwigType *t) {