fix perl C errors

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8481 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-01-19 04:53:15 +00:00
commit 9d50efa32e
2 changed files with 4 additions and 7 deletions

View file

@ -306,9 +306,8 @@ public:
"#else\n",
"#define MAGIC_CLASS\n",
"#endif\n",
"SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *sv, MAGIC *mg) {\n",
"SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *SWIGUNUSEDPARM(sv), MAGIC *SWIGUNUSEDPARM(mg)) {\n",
tab4, "MAGIC_PPERL\n",
tab4, "sv = sv; mg = mg;\n",
tab4, "croak(\"Value is read-only.\");\n",
tab4, "return 0;\n",
"}\n",
@ -821,10 +820,9 @@ public:
/* Create a Perl function for setting the variable value */
if (!GetFlag(n,"feature:immutable")) {
Printf(setf->def,"SWIGCLASS_STATIC int %s(pTHX_ SV* sv, MAGIC *mg) {\n", set_name);
Printf(setf->def,"SWIGCLASS_STATIC int %s(pTHX_ SV* sv, MAGIC * SWIGUNUSEDPARM(mg)) {\n", set_name);
Printv(setf->code,
tab4, "MAGIC_PPERL\n",
tab4, "mg = mg;\n",
NIL);
/* Check for a few typemaps */
@ -847,10 +845,9 @@ public:
/* Now write a function to evaluate the variable */
Printf(getf->def,"SWIGCLASS_STATIC int %s(pTHX_ SV *sv, MAGIC *mg) {\n", val_name);
Printf(getf->def,"SWIGCLASS_STATIC int %s(pTHX_ SV *sv, MAGIC *SWIGUNUSEDPARM(mg)) {\n", val_name);
Printv(getf->code,
tab4, "MAGIC_PPERL\n",
tab4, "mg = mg;\n",
NIL);
if ((tm = Swig_typemap_lookup_new("varout",n,name,0))) {