1
1

Modified STATIC_INIT to accept a statically declared variable.

This commit was SVN r10.
Этот коммит содержится в:
Rob Awles 2003-12-22 19:28:08 +00:00
родитель 695dd34a8f
Коммит 456d544b1f
2 изменённых файлов: 3 добавлений и 2 удалений
src/lam/lfc

Просмотреть файл

@ -27,6 +27,7 @@
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
*/ */
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include <string.h>
#include "lam/base/array.h" #include "lam/base/array.h"
lam_class_info_t array_cls = {"lam_array_t", &object_cls, lam_class_info_t array_cls = {"lam_array_t", &object_cls,

Просмотреть файл

@ -84,8 +84,8 @@ extern lam_class_info_t object_cls;
dynamically allocated. */ dynamically allocated. */
#define STATIC_INIT(obj, cls_ptr) \ #define STATIC_INIT(obj, cls_ptr) \
do { \ do { \
OBJECT(obj)->obj_class = cls_ptr; \ OBJECT(&(obj))->obj_class = cls_ptr; \
OBJECT(obj)->obj_class->cls_init(obj); \ OBJECT(&(obj))->obj_class->cls_init(OBJECT(&(obj))); \
} while (0) } while (0)
/* super_cls should be the pointer to the obj's parent /* super_cls should be the pointer to the obj's parent