common: prevent buffer overflow
[supercollider.git] / include / lang / PyrPrimitiveProto.h
blob4be6f0afd45759033966178eb7921e53b007503c
1 /*
2 SuperCollider real time audio synthesis system
3 Copyright (c) 2002 James McCartney. All rights reserved.
4 http://www.audiosynth.com
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 #ifndef _PYRPRIMITIVEPROTO_H_
22 #define _PYRPRIMITIVEPROTO_H_
24 #include "PyrPrimitive.h"
26 int basicNew(VMGlobals *g, int numArgsPushed);
27 int basicNewClear(VMGlobals *g, int numArgsPushed);
28 int basicSwap(VMGlobals *g, int numArgsPushed);
29 int instVarAt(VMGlobals *g, int numArgsPushed);
30 int instVarPut(VMGlobals *g, int numArgsPushed);
31 int instVarSize(VMGlobals *g, int numArgsPushed);
32 int objectHash(VMGlobals *g, int numArgsPushed);
33 int objectClass(VMGlobals *g, int numArgsPushed);
34 int blockValue(VMGlobals *g, int numArgsPushed);
35 int blockValueWithKeys(VMGlobals *g, int allArgsPushed, int numKeyArgsPushed);
36 int blockValueArray(VMGlobals *g, int numArgsPushed);
37 int blockSpawn(VMGlobals *g, int numArgsPushed);
39 int objectIsKindOf(VMGlobals *g, int numArgsPushed);
40 int objectIsMemberOf(VMGlobals *g, int numArgsPushed);
41 int objectDump(VMGlobals *g, int numArgsPushed);
42 int haltInterpreter(VMGlobals *g, int numArgsPushed);
43 int objectIdentical(VMGlobals *g, int numArgsPushed);
44 int objectNotIdentical(VMGlobals *g, int numArgsPushed);
45 int objectPerform(VMGlobals *g, int numArgsPushed);
46 int objectPerformList(VMGlobals *g, int numArgsPushed);
47 int objectPerformSelList(VMGlobals *g, int numArgsPushed);
48 int undefinedPrimitive(VMGlobals *g, int numArgsPushed);
50 int prObjectString(VMGlobals *g, int numArgsPushed);
51 int prClassString(VMGlobals *g, int numArgsPushed);
52 int prSymbolString(VMGlobals *g, int numArgsPushed);
53 int prSymbolClass(VMGlobals *g, int numArgsPushed);
54 int prPostString(VMGlobals *g, int numArgsPushed);
55 int prPostLine(VMGlobals *g, int numArgsPushed);
56 int prFlushPostBuf(VMGlobals *g, int numArgsPushed);
58 int prPrimitiveError(VMGlobals *g, int numArgsPushed);
59 int prPrimitiveErrorString(VMGlobals *g, int numArgsPushed);
60 int prDumpStack(VMGlobals *g, int numArgsPushed);
61 int prDebugger(VMGlobals *g, int numArgsPushed);
62 int prPrimName(VMGlobals *g, int numArgsPushed);
63 int prObjectShallowCopy(VMGlobals *g, int numArgsPushed);
64 int prObjectCopyRange(VMGlobals *g, int numArgsPushed);
65 int prObjectPointsTo(VMGlobals *g, int numArgsPushed);
66 int prObjectRespondsTo(VMGlobals *g, int numArgsPushed);
68 int prCompileString(VMGlobals *g, int numArgsPushed);
69 int prDumpBackTrace(VMGlobals *g, int numArgsPushed);
70 int prDumpByteCodes(VMGlobals *g, int numArgsPushed);
71 int prAllClasses(VMGlobals *g, int numArgsPushed);
72 int prPostClassTree(VMGlobals *g, int numArgsPushed);
74 void initPrimitiveTable();
75 void growPrimitiveTable(int newsize);
77 void initPrimitives();
78 void doPrimitive(VMGlobals* g, struct PyrMethod* meth, int numArgsPushed);
79 void doPrimitiveWithKeys(VMGlobals* g, struct PyrMethod* meth, int allArgsPushed, int numKeysPushed);
81 #endif