Fix #1904537 Swig causes a Perl warning 'x used only once' in Perl 5.10 reported by Ari Jolma
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10286 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
1a560e3866
commit
30c4214ece
5 changed files with 11 additions and 7 deletions
|
|
@ -1,5 +1,9 @@
|
||||||
Version 1.3.35 (in progress)
|
Version 1.3.35 (in progress)
|
||||||
============================
|
============================
|
||||||
|
|
||||||
|
02/29/2008: wsfulton
|
||||||
|
[Perl] Fix #1904537 Swig causes a Perl warning "x used only once" in Perl 5.10
|
||||||
|
reported by Ari Jolma
|
||||||
|
|
||||||
02/29/2008: wsfulton
|
02/29/2008: wsfulton
|
||||||
[Python] Add shared_ptr varin/varout typemaps for wrapping global variables.
|
[Python] Add shared_ptr varin/varout typemaps for wrapping global variables.
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ XS(SWIG_init) {
|
||||||
/* Install variables */
|
/* Install variables */
|
||||||
for (i = 0; swig_variables[i].name; i++) {
|
for (i = 0; swig_variables[i].name; i++) {
|
||||||
SV *sv;
|
SV *sv;
|
||||||
sv = get_sv((char*) swig_variables[i].name, TRUE | 0x2);
|
sv = get_sv((char*) swig_variables[i].name, TRUE | 0x2 | GV_ADDMULTI);
|
||||||
if (swig_variables[i].type) {
|
if (swig_variables[i].type) {
|
||||||
SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0);
|
SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -51,7 +51,7 @@ XS(SWIG_init) {
|
||||||
/* Install constant */
|
/* Install constant */
|
||||||
for (i = 0; swig_constants[i].type; i++) {
|
for (i = 0; swig_constants[i].type; i++) {
|
||||||
SV *sv;
|
SV *sv;
|
||||||
sv = get_sv((char*)swig_constants[i].name, TRUE | 0x2);
|
sv = get_sv((char*)swig_constants[i].name, TRUE | 0x2 | GV_ADDMULTI);
|
||||||
switch(swig_constants[i].type) {
|
switch(swig_constants[i].type) {
|
||||||
case SWIG_INT:
|
case SWIG_INT:
|
||||||
sv_setiv(sv, (IV) swig_constants[i].lvalue);
|
sv_setiv(sv, (IV) swig_constants[i].lvalue);
|
||||||
|
|
|
||||||
|
|
@ -444,7 +444,7 @@ SWIG_Perl_GetModule(void) {
|
||||||
|
|
||||||
/* first check if pointer already created */
|
/* first check if pointer already created */
|
||||||
if (!type_pointer) {
|
if (!type_pointer) {
|
||||||
pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE);
|
pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE | GV_ADDMULTI);
|
||||||
if (pointer && SvOK(pointer)) {
|
if (pointer && SvOK(pointer)) {
|
||||||
type_pointer = INT2PTR(swig_type_info **, SvIV(pointer));
|
type_pointer = INT2PTR(swig_type_info **, SvIV(pointer));
|
||||||
}
|
}
|
||||||
|
|
@ -458,7 +458,7 @@ SWIG_Perl_SetModule(swig_module_info *module) {
|
||||||
SV *pointer;
|
SV *pointer;
|
||||||
|
|
||||||
/* create a new pointer */
|
/* create a new pointer */
|
||||||
pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE);
|
pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE | GV_ADDMULTI);
|
||||||
sv_setiv(pointer, PTR2IV(module));
|
sv_setiv(pointer, PTR2IV(module));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@
|
||||||
|
|
||||||
/* constant */
|
/* constant */
|
||||||
%define %set_constant(name, obj) %begin_block
|
%define %set_constant(name, obj) %begin_block
|
||||||
SV *sv = get_sv((char*) SWIG_prefix name, TRUE | 0x2);
|
SV *sv = get_sv((char*) SWIG_prefix name, TRUE | 0x2 | GV_ADDMULTI);
|
||||||
sv_setsv(sv, obj);
|
sv_setsv(sv, obj);
|
||||||
SvREADONLY_on(sv);
|
SvREADONLY_on(sv);
|
||||||
%end_block %enddef
|
%end_block %enddef
|
||||||
|
|
|
||||||
|
|
@ -376,7 +376,7 @@
|
||||||
%dirout_fail(swig_res,"$type");
|
%dirout_fail(swig_res,"$type");
|
||||||
}
|
}
|
||||||
$result = %reinterpret_cast(swig_argp, $ltype);
|
$result = %reinterpret_cast(swig_argp, $ltype);
|
||||||
swig_acquire_ownership_obj(%as_voidptr($result), own);
|
swig_acquire_ownership_obj(%as_voidptr($result), own /* & TODO: SWIG_POINTER_OWN */);
|
||||||
}
|
}
|
||||||
%typemap(directorfree,noblock=1,match="directorout") SWIGTYPE * {
|
%typemap(directorfree,noblock=1,match="directorout") SWIGTYPE * {
|
||||||
if (director) {
|
if (director) {
|
||||||
|
|
@ -392,7 +392,7 @@
|
||||||
}
|
}
|
||||||
if (!swig_argp) { %dirout_nullref("$type"); }
|
if (!swig_argp) { %dirout_nullref("$type"); }
|
||||||
$result = %reinterpret_cast(swig_argp, $ltype);
|
$result = %reinterpret_cast(swig_argp, $ltype);
|
||||||
swig_acquire_ownership_obj(%as_voidptr($result), own);
|
swig_acquire_ownership_obj(%as_voidptr($result), own /* & TODO: SWIG_POINTER_OWN */);
|
||||||
}
|
}
|
||||||
%typemap(directorfree,noblock=1,match="directorout") SWIGTYPE & {
|
%typemap(directorfree,noblock=1,match="directorout") SWIGTYPE & {
|
||||||
if (director) {
|
if (director) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue