Fixed compiler warnings in squirrel (minor stuff, patch is submitted to upstream)
authorIngo Ruhnke <grumbel@gmx.de>
Tue, 3 Mar 2009 11:08:43 +0000 (11:08 +0000)
committerIngo Ruhnke <grumbel@gmx.de>
Tue, 3 Mar 2009 11:08:43 +0000 (11:08 +0000)
SVN-Revision: 5843

src/squirrel/include/sqstdio.h
src/squirrel/sqstdlib/sqstdstream.cpp
src/squirrel/sqstdlib/sqstdstream.h

index 2cb744b..5eaec31 100644 (file)
@@ -7,6 +7,7 @@
 #define SQSTD_STREAM_TYPE_TAG 0x80000000
 
 struct SQStream {
+       virtual ~SQStream() {}
        virtual SQInteger Read(void *buffer, SQInteger size) = 0;
        virtual SQInteger Write(void *buffer, SQInteger size) = 0;
        virtual SQInteger Flush() = 0;
index 4cd63da..f373f5b 100644 (file)
@@ -277,7 +277,7 @@ void init_streamclass(HSQUIRRELVM v)
        sq_pop(v,1);
 }
 
-SQRESULT declare_stream(HSQUIRRELVM v,SQChar* name,SQUserPointer typetag,SQChar* reg_name,SQRegFunction *methods,SQRegFunction *globals)
+SQRESULT declare_stream(HSQUIRRELVM v,const SQChar* name,SQUserPointer typetag,const SQChar* reg_name,SQRegFunction *methods,SQRegFunction *globals)
 {
        if(sq_gettype(v,-1) != OT_TABLE)
                return sq_throwerror(v,_SC("table expected"));
index 6b5bb9d..4dcc000 100644 (file)
@@ -14,5 +14,5 @@ SQInteger _stream_eos(HSQUIRRELVM v);
 SQInteger _stream_flush(HSQUIRRELVM v);
 
 #define _DECL_STREAM_FUNC(name,nparams,typecheck) {_SC(#name),_stream_##name,nparams,typecheck}
-SQRESULT declare_stream(HSQUIRRELVM v,SQChar* name,SQUserPointer typetag,SQChar* reg_name,SQRegFunction *methods,SQRegFunction *globals);
+SQRESULT declare_stream(HSQUIRRELVM v,const SQChar* name,SQUserPointer typetag,const SQChar* reg_name,SQRegFunction *methods,SQRegFunction *globals);
 #endif /*_SQSTD_STREAM_H_*/