DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
Link: http://www.fltk.org/str.php?L2455
Version: 1.3-current
Link: http://www.fltk.org/str.php?L2455
Version: 1.3-current
Index: Fl_Type.h
===================================================================
--- Fl_Type.h (revision 7893)
+++ Fl_Type.h (working copy)
@@ -166,6 +166,12 @@
const char* return_type;
char public_, cdecl_, constructor, havewidgets;
public:
+ Fl_Function_Type():Fl_Type(){
+ return_type = NULL;
+ }
+ ~Fl_Function_Type(){
+ if(return_type) free((void*)return_type);
+ }
Fl_Type *make();
void write_code1();
void write_code2();
@@ -182,6 +188,7 @@
void write_properties();
void read_property(const char *);
int has_signature(const char *, const char*) const;
+ const char * rtype() {return return_type;};
};
class Fl_Code_Type : public Fl_Type {
@@ -199,6 +206,12 @@
class Fl_CodeBlock_Type : public Fl_Type {
const char* after;
public:
+ Fl_CodeBlock_Type():Fl_Type(){
+ after = NULL;
+ }
+ ~Fl_CodeBlock_Type(){
+ if(after) free((void*)after);
+ }
Fl_Type *make();
void write_code1();
void write_code2();
@@ -231,6 +245,12 @@
class Fl_Data_Type : public Fl_Decl_Type {
const char *filename_;
public:
+ Fl_Data_Type():Fl_Decl_Type(){
+ filename_ = NULL;
+ }
+ ~Fl_Data_Type(){
+ if(filename_) free((void*)filename_);
+ }
Fl_Type *make();
void write_code1();
void write_code2();
@@ -245,6 +265,12 @@
const char* after;
char public_;
public:
+ Fl_DeclBlock_Type():Fl_Type(){
+ after = NULL;
+ }
+ ~Fl_DeclBlock_Type(){
+ if(after) free((void*)after);
+ }
Fl_Type *make();
void write_code1();
void write_code2();
@@ -279,6 +305,14 @@
const char* subclass_of;
char public_;
public:
+ Fl_Class_Type():Fl_Type(){
+ subclass_of = NULL;
+ class_prefix = NULL;
+ }
+ ~Fl_Class_Type(){
+ if(subclass_of) free((void*)subclass_of);
+ if(class_prefix) free((void*)class_prefix);
+ }
// state variables for output:
char write_public_state; // true when public: has been printed
Fl_Class_Type* parent_class; // save class if nested
Index: Fl_Widget_Type.cxx
===================================================================
--- Fl_Widget_Type.cxx (revision 7893)
+++ Fl_Widget_Type.cxx (working copy)
@@ -198,7 +198,8 @@
}
Fl_Widget_Type::Fl_Widget_Type() {
- for (int n=0; n<NUM_EXTRA_CODE; n++) {extra_code_[n] = 0; subclass_ = 0;}
+ for (int n=0; n<NUM_EXTRA_CODE; n++) {extra_code_[n] = 0; }
+ subclass_ = 0;
hotspot_ = 0;
tooltip_ = 0;
image_name_ = 0;
@@ -216,6 +217,13 @@
if (o->parent()) ((Fl_Group*)o->parent())->remove(*o);
delete o;
}
+ if(subclass_) free((void*)subclass_);
+ if(tooltip_) free((void*)tooltip_);
+ if(image_name_) free((void*)image_name_);
+ if(inactive_name_) free((void*)inactive_name_);
+ for (int n=0; n<NUM_EXTRA_CODE; n++) {
+ if(extra_code_[n]) free((void*) extra_code_[n]);
+ }
}
void Fl_Widget_Type::extra_code(int m,const char *n) {
@@ -291,6 +315,7 @@
// initialized parts of the widget that are nyi by fluid.
Fl_Widget_Type *current_widget; // one of the selected ones
+void* const LOAD = (void *)"LOAD";
static int numselected; // number selected
static int haderror;
Index: Fl_Widget_Type.h
===================================================================
--- Fl_Widget_Type.h (revision 7893)
+++ Fl_Widget_Type.h (working copy)
@@ -34,7 +34,7 @@
struct Fl_Menu_Item;
class Fluid_Image;
-void* const LOAD = (void *)9831;
+extern void* const LOAD;
extern Fl_Widget_Type *current_widget; // one of the selected ones
//
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs