Skip to content

Commit 03d83b1

Browse files
committed
Remove unused truffle_get_constant machinery
1 parent c834760 commit 03d83b1

File tree

2 files changed

+0
-107
lines changed

2 files changed

+0
-107
lines changed

graalpython/com.oracle.graal.python.cext/src/capi.c

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,6 @@ PY_TYPE_OBJECTS
193193
#undef PY_TRUFFLE_TYPE_GENERIC
194194
#undef PY_TRUFFLE_TYPE_UNIMPLEMENTED
195195

196-
/*
197-
* This header includes definitions for constant arrays like:
198-
* _Py_ascii_whitespace, _Py_ctype_table, _Py_ctype_tolower, _Py_ctype_toupper.
199-
*/
200-
#include "const_arrays.h"
201196

202197
#define BUILTIN(NAME, RET, ...) RET (*Graal##NAME)(__VA_ARGS__);
203198
CAPI_BUILTINS
@@ -812,55 +807,6 @@ PyAPI_FUNC(void*) truffle_convert_pointer(Py_ssize_t value) {
812807
return (void*) value;
813808
}
814809

815-
PyAPI_FUNC(void*) truffle_get_constant(int entry) {
816-
// this needs to correspond to CApiContext.resolveConstant
817-
switch(entry) {
818-
case 0:
819-
return _Py_ascii_whitespace;
820-
case 1:
821-
return _Py_ctype_table;
822-
case 2:
823-
return _Py_ctype_tolower;
824-
case 3:
825-
return _Py_ctype_toupper;
826-
case 4:
827-
return &_Py_tracemalloc_config;
828-
case 5:
829-
return &_Py_HashSecret;
830-
case 6:
831-
return &Py_DebugFlag;
832-
case 7:
833-
return &Py_VerboseFlag;
834-
case 8:
835-
return &Py_QuietFlag;
836-
case 9:
837-
return &Py_InteractiveFlag;
838-
case 10:
839-
return &Py_InspectFlag;
840-
case 11:
841-
return &Py_OptimizeFlag;
842-
case 12:
843-
return &Py_NoSiteFlag;
844-
case 13:
845-
return &Py_BytesWarningFlag;
846-
case 14:
847-
return &Py_FrozenFlag;
848-
case 15:
849-
return &Py_IgnoreEnvironmentFlag;
850-
case 16:
851-
return &Py_DontWriteBytecodeFlag;
852-
case 17:
853-
return &Py_NoUserSiteDirectory;
854-
case 18:
855-
return &Py_UnbufferedStdioFlag;
856-
case 19:
857-
return &Py_HashRandomizationFlag;
858-
case 20:
859-
return &Py_IsolatedFlag;
860-
}
861-
return NULL;
862-
}
863-
864810
// defined in 'exceptions.c'
865811
void initialize_exceptions();
866812
// defined in 'pyhash.c'

graalpython/com.oracle.graal.python.cext/src/const_arrays.h

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)