Skip to content

Commit

Permalink
set auto_attrs in nci pmc
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.parrot.org/parrot/branches/auto_attrs@40420 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
NotFound authored and NotFound committed Aug 5, 2009
1 parent 849640f commit da36934
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions src/pmc/nci.pmc
Expand Up @@ -94,7 +94,7 @@ void pcc_params(PARROT_INTERP, STRING *sig, Parrot_NCI_attributes * const nci_in
}


pmclass NCI need_ext {
pmclass NCI need_ext auto_attrs {
ATTR STRING *signature; /* The signature. */
ATTR void *func; /* Function pointer to call. */
ATTR void *orig_func; /* Function pointer
Expand Down Expand Up @@ -148,12 +148,9 @@ Initializes the NCI with a C<NULL> function pointer.
*/

VTABLE void init() {
PMC_data(SELF) = mem_allocate_zeroed_typed(Parrot_NCI_attributes);

/* Mark that we're not a raw NCI. */
PObj_flag_CLEAR(private2, SELF);
PObj_custom_mark_SET(SELF);
PObj_active_destroy_SET(SELF);
}

/*
Expand Down Expand Up @@ -224,25 +221,6 @@ Mark any referenced strings and PMCs.

/*

=item C<void destroy()>

Destroys the NCI, freeing any allocated memory.

=cut

*/

VTABLE void destroy() {
if (PMC_data(SELF)) {
Parrot_NCI_attributes * const nci_info = PARROT_NCI(SELF);

mem_sys_free(nci_info);
PMC_data(SELF) = NULL;
}
}

/*

=item C<PMC *clone()>

Creates and returns a clone of the NCI.
Expand Down

0 comments on commit da36934

Please sign in to comment.