From b9c9f9e137910daedb09a363f102eb688aeb77d6 Mon Sep 17 00:00:00 2001 From: Georg Holzmann Date: Thu, 1 Mar 2007 18:06:58 +0000 Subject: fix to support Pd-Extended and also the old buildsystem svn path=/trunk/externals/grh/; revision=7457 --- PDContainer/src/h_deque.cpp | 13 ++++++++++++- PDContainer/src/h_list.cpp | 12 +++++++++++- PDContainer/src/h_map.cpp | 12 +++++++++++- PDContainer/src/h_multimap.cpp | 13 ++++++++++++- PDContainer/src/h_multiset.cpp | 12 +++++++++++- PDContainer/src/h_prioqueue.cpp | 12 +++++++++++- PDContainer/src/h_queue.cpp | 12 +++++++++++- PDContainer/src/h_set.cpp | 12 +++++++++++- PDContainer/src/h_stack.cpp | 12 +++++++++++- PDContainer/src/h_vector.cpp | 14 ++++++++++++-- 10 files changed, 113 insertions(+), 11 deletions(-) diff --git a/PDContainer/src/h_deque.cpp b/PDContainer/src/h_deque.cpp index c8a5419..7ab9499 100755 --- a/PDContainer/src/h_deque.cpp +++ b/PDContainer/src/h_deque.cpp @@ -538,7 +538,13 @@ static void *h_deque_free(t_h_deque *x) return (void *)x; } -extern "C" void h_deque_setup(void) + +#if defined(PDCONTAINER_SINGLE_OBJECT) +// for PD-Extended +extern "C" { +#endif + +void h_deque_setup(void) { // the object class h_deque_class = class_new(gensym("h_deque"), (t_newmethod)h_deque_new, @@ -602,3 +608,8 @@ extern "C" void h_deque_setup(void) // without an argument the following two methods wont work ??? why?? because of c++? class_addmethod(h_deque_class, (t_method)h_deque_help, gensym("help"),A_DEFFLOAT, 0); } + +#if defined(PDCONTAINER_SINGLE_OBJECT) +// for PD-Extended +} +#endif diff --git a/PDContainer/src/h_list.cpp b/PDContainer/src/h_list.cpp index 3434bff..7da94be 100755 --- a/PDContainer/src/h_list.cpp +++ b/PDContainer/src/h_list.cpp @@ -393,7 +393,12 @@ static void *h_list_free(t_h_list *x) return (void *)x; } -extern "C" void h_list_setup(void) +#if defined(PDCONTAINER_SINGLE_OBJECT) +// for PD-Extended +extern "C" { +#endif + +void h_list_setup(void) { // the object class h_list_class = class_new(gensym("h_list"), (t_newmethod)h_list_new, @@ -466,3 +471,8 @@ extern "C" void h_list_setup(void) // without an argument the following two methods wont work ??? why?? because of c++? class_addmethod(h_list_class, (t_method)h_list_help, gensym("help"),A_DEFFLOAT, 0); } + +#if defined(PDCONTAINER_SINGLE_OBJECT) +// for PD-Extended +} +#endif diff --git a/PDContainer/src/h_map.cpp b/PDContainer/src/h_map.cpp index 71befe9..dc733aa 100755 --- a/PDContainer/src/h_map.cpp +++ b/PDContainer/src/h_map.cpp @@ -338,7 +338,12 @@ static void *h_map_free(t_h_map *x) return (void *)x; } -extern "C" void h_map_setup(void) +#if defined(PDCONTAINER_SINGLE_OBJECT) +// for PD-Extended +extern "C" { +#endif + +void h_map_setup(void) { // the object class h_map_class = class_new(gensym("h_map"), (t_newmethod)h_map_new, @@ -384,3 +389,8 @@ extern "C" void h_map_setup(void) // without an argument the following two methods wont work ??? why?? because of c++? class_addmethod(h_map_class, (t_method)h_map_help, gensym("help"),A_DEFFLOAT, 0); } + +#if defined(PDCONTAINER_SINGLE_OBJECT) +// for PD-Extended +} +#endif diff --git a/PDContainer/src/h_multimap.cpp b/PDContainer/src/h_multimap.cpp index f6566de..a77f9a1 100755 --- a/PDContainer/src/h_multimap.cpp +++ b/PDContainer/src/h_multimap.cpp @@ -335,7 +335,12 @@ static void *h_multimap_free(t_h_multimap *x) return (void *)x; } -extern "C" void h_multimap_setup(void) +#if defined(PDCONTAINER_SINGLE_OBJECT) +// for PD-Extended +extern "C" { +#endif + +void h_multimap_setup(void) { h_multimap_class = class_new(gensym("h_multimap"), (t_newmethod)h_multimap_new, (t_method)h_multimap_free, sizeof(t_h_multimap), @@ -381,3 +386,9 @@ extern "C" void h_multimap_setup(void) class_addmethod(h_multimap_class, (t_method)h_multimap_help, gensym("help"),A_DEFFLOAT, 0); } + +#if defined(PDCONTAINER_SINGLE_OBJECT) +// for PD-Extended +} +#endif + diff --git a/PDContainer/src/h_multiset.cpp b/PDContainer/src/h_multiset.cpp index 815e9e0..8a42eb2 100755 --- a/PDContainer/src/h_multiset.cpp +++ b/PDContainer/src/h_multiset.cpp @@ -205,7 +205,12 @@ static void *h_multiset_free(t_h_multiset *x) return (void *)x; } -extern "C" void h_multiset_setup(void) +#if defined(PDCONTAINER_SINGLE_OBJECT) +// for PD-Extended +extern "C" { +#endif + +void h_multiset_setup(void) { // the object class h_multiset_class = class_new(gensym("h_multiset"), (t_newmethod)h_multiset_new, @@ -244,3 +249,8 @@ extern "C" void h_multiset_setup(void) // without an argument the following two methods wont work ??? why?? because of c++? class_addmethod(h_multiset_class, (t_method)h_multiset_help, gensym("help"),A_DEFFLOAT, 0); } + +#if defined(PDCONTAINER_SINGLE_OBJECT) +// for PD-Extended +} +#endif diff --git a/PDContainer/src/h_prioqueue.cpp b/PDContainer/src/h_prioqueue.cpp index 412ad8b..c032f39 100755 --- a/PDContainer/src/h_prioqueue.cpp +++ b/PDContainer/src/h_prioqueue.cpp @@ -216,7 +216,12 @@ static void *h_prioqueue_free(t_h_prioqueue *x) return (void *)x; } -extern "C" void h_prioqueue_setup(void) +#if defined(PDCONTAINER_SINGLE_OBJECT) +// for PD-Extended +extern "C" { +#endif + +void h_prioqueue_setup(void) { // the object class h_prioqueue_class = class_new(gensym("h_prioqueue"), (t_newmethod)h_prioqueue_new, @@ -248,3 +253,8 @@ extern "C" void h_prioqueue_setup(void) // without an argument the following two methods wont work ??? why?? because of c++? class_addmethod(h_prioqueue_class, (t_method)h_prioqueue_help, gensym("help"),A_DEFFLOAT, 0); } + +#if defined(PDCONTAINER_SINGLE_OBJECT) +// for PD-Extended +} +#endif diff --git a/PDContainer/src/h_queue.cpp b/PDContainer/src/h_queue.cpp index a8ad342..30caf4d 100755 --- a/PDContainer/src/h_queue.cpp +++ b/PDContainer/src/h_queue.cpp @@ -136,7 +136,12 @@ static void *h_queue_free(t_h_queue *x) return (void *)x; } -extern "C" void h_queue_setup(void) +#if defined(PDCONTAINER_SINGLE_OBJECT) +// for PD-Extended +extern "C" { +#endif + +void h_queue_setup(void) { // the object class h_queue_class = class_new(gensym("h_queue"), (t_newmethod)h_queue_new, @@ -163,3 +168,8 @@ extern "C" void h_queue_setup(void) // without an argument the following two methods wont work ??? why?? because of c++? class_addmethod(h_queue_class, (t_method)h_queue_help, gensym("help"),A_DEFFLOAT, 0); } + +#if defined(PDCONTAINER_SINGLE_OBJECT) +// for PD-Extended +} +#endif diff --git a/PDContainer/src/h_set.cpp b/PDContainer/src/h_set.cpp index c8f1d58..5bf84e4 100755 --- a/PDContainer/src/h_set.cpp +++ b/PDContainer/src/h_set.cpp @@ -205,7 +205,12 @@ static void *h_set_free(t_h_set *x) return (void *)x; } -extern "C" void h_set_setup(void) +#if defined(PDCONTAINER_SINGLE_OBJECT) +// for PD-Extended +extern "C" { +#endif + +void h_set_setup(void) { // the object class h_set_class = class_new(gensym("h_set"), (t_newmethod)h_set_new, @@ -244,3 +249,8 @@ extern "C" void h_set_setup(void) // without an argument the following two methods wont work ??? why?? because of c++? class_addmethod(h_set_class, (t_method)h_set_help, gensym("help"),A_DEFFLOAT, 0); } + +#if defined(PDCONTAINER_SINGLE_OBJECT) +// for PD-Extended +} +#endif diff --git a/PDContainer/src/h_stack.cpp b/PDContainer/src/h_stack.cpp index fece032..1a2c044 100755 --- a/PDContainer/src/h_stack.cpp +++ b/PDContainer/src/h_stack.cpp @@ -136,7 +136,12 @@ static void *h_stack_free(t_h_stack *x) return (void *)x; } -extern "C" void h_stack_setup(void) +#if defined(PDCONTAINER_SINGLE_OBJECT) +// for PD-Extended +extern "C" { +#endif + +void h_stack_setup(void) { // the object class h_stack_class = class_new(gensym("h_stack"), (t_newmethod)h_stack_new, @@ -163,3 +168,8 @@ extern "C" void h_stack_setup(void) // without an argument the following two methods wont work ??? why?? because of c++? class_addmethod(h_stack_class, (t_method)h_stack_help, gensym("help"),A_DEFFLOAT, 0); } + +#if defined(PDCONTAINER_SINGLE_OBJECT) +// for PD-Extended +} +#endif diff --git a/PDContainer/src/h_vector.cpp b/PDContainer/src/h_vector.cpp index ca2fede..8c4c8fb 100755 --- a/PDContainer/src/h_vector.cpp +++ b/PDContainer/src/h_vector.cpp @@ -456,7 +456,12 @@ static void *h_vector_free(t_h_vector *x) return (void *)x; } -extern "C" void h_vector_setup(void) +#if defined(PDCONTAINER_SINGLE_OBJECT) +// for PD-Extended +extern "C" { +#endif + +void h_vector_setup(void) { // the object class h_vector_class = class_new(gensym("h_vector"), (t_newmethod)h_vector_new, @@ -488,7 +493,7 @@ extern "C" void h_vector_setup(void) gensym("namespace"), A_DEFSYMBOL , 0); class_addmethod(h_vector_class, (t_method)h_vector_get_namespace, gensym("getnamespace"), A_DEFFLOAT, 0); - class_addmethod(h_vector_class, (t_method)h_vector_print, + class_addmethod(h_vector_class, (t_method)h_vector_getall, gensym("getall"), A_DEFFLOAT, 0); class_addmethod(h_vector_class, (t_method)h_vector_print, gensym("print"), A_DEFFLOAT, 0); @@ -512,3 +517,8 @@ extern "C" void h_vector_setup(void) // without an argument the following two methods wont work ??? why?? because of c++? class_addmethod(h_vector_class, (t_method)h_vector_help, gensym("help"),A_DEFFLOAT, 0); } + +#if defined(PDCONTAINER_SINGLE_OBJECT) +// for PD-Extended +} +#endif -- cgit v1.2.1