more perl cleaning
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7731 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
88e8275dc2
commit
16bd77e9d6
2 changed files with 5 additions and 12 deletions
|
|
@ -19,13 +19,7 @@ typedef struct SWIGCDATA {
|
|||
* Typemaps for returning binary data
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
#if SWIGPERL
|
||||
%typemap(out) SWIGCDATA {
|
||||
ST(argvi) = sv_newmortal();
|
||||
sv_setpvn((SV*)ST(argvi++),$1.data,$1.len);
|
||||
}
|
||||
%typemap(in) (const void *indata, int inlen) = (char *STRING, int LENGTH);
|
||||
#elif SWIGGUILE
|
||||
#if SWIGGUILE
|
||||
%typemap(out) SWIGCDATA {
|
||||
$result = gh_str2scm($1.data,$1.len);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
/* Error manipulation */
|
||||
|
||||
#define SWIG_ErrorType(code) SWIG_Perl_ErrorType(code)
|
||||
#define SWIG_Error(code, msg) sv_setpvf(perl_get_sv("@", TRUE), "%s error %s\n", SWIG_ErrorType(code), msg)
|
||||
#define SWIG_Error(code, msg) warn("%s %s\n", SWIG_ErrorType(code), msg)
|
||||
#define SWIG_fail goto fail
|
||||
|
||||
/* Perl-specific SWIG API */
|
||||
|
|
@ -156,10 +156,9 @@ SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *
|
|||
To set ownership (see bellow), an newSViv(1) entry is added.
|
||||
Hence, to remove ownership, we delete the entry.
|
||||
*/
|
||||
|
||||
/* SV *val = */
|
||||
hv_delete_ent(hv, obj, 0, 0);
|
||||
/* if (val) SvREFCNT_dec(val); */
|
||||
if (hv_exists_ent(hv, obj, 0)) {
|
||||
hv_delete_ent(hv, obj, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
return SWIG_OK;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue