[svn:parrot] r39175 - trunk/lib/Parrot/Pmc2c
petdance at svn.parrot.org
petdance at svn.parrot.org
Tue May 26 06:20:55 UTC 2009
Author: petdance
Date: Tue May 26 06:20:54 2009
New Revision: 39175
URL: https://trac.parrot.org/parrot/changeset/39175
Log:
adding splint macros to the generated C code from PMCs
Modified:
trunk/lib/Parrot/Pmc2c/PMCEmitter.pm
Modified: trunk/lib/Parrot/Pmc2c/PMCEmitter.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/PMCEmitter.pm Tue May 26 05:55:15 2009 (r39174)
+++ trunk/lib/Parrot/Pmc2c/PMCEmitter.pm Tue May 26 06:20:54 2009 (r39175)
@@ -130,8 +130,8 @@
}
if ($name ne 'default') {
- $h->emit("${export}VTABLE* Parrot_${name}_update_vtable(VTABLE*);\n");
- $h->emit("${export}VTABLE* Parrot_${name}_ro_update_vtable(VTABLE*);\n");
+ $h->emit("${export}VTABLE* Parrot_${name}_update_vtable(ARGMOD(VTABLE*));\n");
+ $h->emit("${export}VTABLE* Parrot_${name}_ro_update_vtable(ARGMOD(VTABLE*));\n");
}
$h->emit("${export}VTABLE* Parrot_${name}_get_vtable(PARROT_INTERP);\n");
$h->emit("${export}VTABLE* Parrot_${name}_ro_get_vtable(PARROT_INTERP);\n");
@@ -182,7 +182,7 @@
$export = $self->is_dynamic ? 'PARROT_DYNEXT_EXPORT ' : 'PARROT_EXPORT ';
- $hout .= "${export}VTABLE* Parrot_${lc_name}_update_vtable(VTABLE*);\n"
+ $hout .= "${export}VTABLE* Parrot_${lc_name}_update_vtable(ARGMOD(VTABLE*));\n"
unless $name eq 'default';
$hout .= "${export}VTABLE* Parrot_${lc_name}_get_vtable(PARROT_INTERP);\n";
@@ -530,7 +530,7 @@
[$ns, $ns_name ]) {
my ($raw_string, $name) = @$s;
next if $strings_seen{$name}++;
- $multi_strings .= " STRING *$name = "
+ $multi_strings .= " STRING * const $name = "
. qq|CONST_STRING_GEN(interp, "$raw_string");\n|;
}
@@ -724,7 +724,7 @@
$cout .= <<"EOC";
{
- PMC * mro = pmc_new(interp, enum_class_ResizableStringArray);
+ PMC * const mro = pmc_new(interp, enum_class_ResizableStringArray);
VTABLE * const vt = interp->vtables[entry];
vt->mro = mro;
@@ -855,7 +855,7 @@
$cout .= <<"EOC";
-PARROT_EXPORT VTABLE *Parrot_${classname}_ro_update_vtable(VTABLE *vt) {
+PARROT_EXPORT VTABLE *Parrot_${classname}_ro_update_vtable(ARGMOD(VTABLE *vt)) {
$vtable_updates
return vt;
}
@@ -889,6 +889,8 @@
$cout .= <<"EOC";
PARROT_EXPORT
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
VTABLE* Parrot_${classname}_get_vtable(PARROT_INTERP) {
VTABLE *vt;
$get_vtable
@@ -909,6 +911,8 @@
$cout .= <<"EOC";
PARROT_EXPORT
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
VTABLE* Parrot_${classname}_ro_get_vtable(PARROT_INTERP) {
VTABLE *vt;
$get_extra_vtable
More information about the parrot-commits
mailing list