mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
(class_add_behavior): If necessary, increase instance_size of class to
which behavior is being added. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@838 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8a669fe04c
commit
ee9f653175
2 changed files with 10 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
/* Behaviors for Objective-C, "for Protocols with implementations".
|
||||
Copyright (C) 1995 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
|
||||
Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu>
|
||||
Date: March 1995
|
||||
|
@ -91,6 +91,10 @@ class_add_behavior (Class class, Class behavior)
|
|||
__objc_send_initialize(class);
|
||||
__objc_send_initialize(behavior);
|
||||
|
||||
/* If necessary, increase instance_size of CLASS. */
|
||||
if (class->instance_size < behavior->instance_size)
|
||||
class->instance_size = behavior->instance_size);
|
||||
|
||||
#if 0
|
||||
/* xxx Do protocols */
|
||||
if (behavior->protocols)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Behaviors for Objective-C, "for Protocols with implementations".
|
||||
Copyright (C) 1995 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
|
||||
Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu>
|
||||
Date: March 1995
|
||||
|
@ -91,6 +91,10 @@ class_add_behavior (Class class, Class behavior)
|
|||
__objc_send_initialize(class);
|
||||
__objc_send_initialize(behavior);
|
||||
|
||||
/* If necessary, increase instance_size of CLASS. */
|
||||
if (class->instance_size < behavior->instance_size)
|
||||
class->instance_size = behavior->instance_size);
|
||||
|
||||
#if 0
|
||||
/* xxx Do protocols */
|
||||
if (behavior->protocols)
|
||||
|
|
Loading…
Reference in a new issue