Don't emit out-of-module sizeof definitions
authorPeter Harris <pharris@opentext.com>
Wed, 8 Sep 2010 19:57:00 +0000 (15:57 -0400)
committerPeter Harris <pharris@opentext.com>
Thu, 23 Sep 2010 02:20:04 +0000 (22:20 -0400)
Signed-off-by: Peter Harris <pharris@opentext.com>
src/c_client.py

index 26826e4..85ae09b 100644 (file)
@@ -399,8 +399,9 @@ def _c_type_setup(self, name, postfix):
                     
         if self.need_sizeof:
             if self.c_sizeof_name not in finished_sizeof:
-                finished_sizeof.append(self.c_sizeof_name)
-                _c_serialize('sizeof', self)
+                if not module.namespace.is_ext or self.name[:2] == module.namespace.prefix:
+                    finished_sizeof.append(self.c_sizeof_name)
+                    _c_serialize('sizeof', self)
 # _c_type_setup()
 
 def _c_helper_absolute_name(prefix, field=None):