Author: jkeenan
Date: Sun Mar 4 17:25:14 2007
New Revision: 17341
Modified:
branches/buildtools/src/pmc/smop_attribute.pmc
Log:
Updating with trunk version; version in this branch failed
t/codingstd/trailingspace.t.
Modified: branches/buildtools/src/pmc/smop_attribute.pmc
==============================================================================
--- branches/buildtools/src/pmc/smop_attribute.pmc (original)
+++ branches/buildtools/src/pmc/smop_attribute.pmc Sun Mar 4 17:25:14 2007
@@ -29,13 +29,14 @@
} SMOP_Attribute;
static void smop_init(Interp *interp, PMC *self) {
+ SMOP_Attribute *smop = NULL;
/* turn on marking of the class_data array */
PObj_data_is_PMC_array_SET(self);
/* turn on custom destruction since our PMC* array is dynamically
allocated */
PObj_active_destroy_SET(self);
PMC_data(self) = mem_sys_allocate_zeroed(sizeof(SMOP_Attribute));
- SMOP_Attribute *smop = SMOP_attr(self);
+ smop = SMOP_attr(self);
}
@@ -82,48 +83,51 @@
=item C<void name(PMC *name)>
- name attribute accessor
+ name attribute accessor
=cut
*/
PMETHOD void name(PMC *name :optional, int got_name :opt_flag) {
+ STRING *name_attr = NULL;
if ( got_name ) {
SMOP_attr(SELF)->name = VTABLE_get_string(interp, name);
}
- STRING* name_attr = SMOP_attr(SELF)->name;
+ name_attr = SMOP_attr(SELF)->name;
preturn( STRING *name_attr );
}
/*
=item C<void class(PMC *class)>
- class attribute accessor
+ class attribute accessor
=cut
*/
PMETHOD void class(PMC *class :optional, int got_class :opt_flag) {
+ PMC *class_attr = NULL;
if ( got_class ) {
SMOP_attr(SELF)->class_ = class;
}
- PMC* class_attr = SMOP_attr(SELF)->class_;
+ class_attr = SMOP_attr(SELF)->class_;
preturn( PMC *class_attr );
}
/*
=item C<void type(PMC *type)>
- type attribute accessor
+ type attribute accessor
=cut
*/
PMETHOD void type(PMC *type :optional, int got_type :opt_flag) {
+ STRING *type_string = NULL;
if ( got_type ) {
SMOP_attr(SELF)->type_ = VTABLE_get_string(interp, type);
}
- STRING* type_string = SMOP_attr(SELF)->type_;
+ type_string = SMOP_attr(SELF)->type_;
preturn( STRING *type_string );
}
}