|
1 | 1 | /* |
2 | | - * Copyright (c) 2016, 2018, Oracle and/or its affiliates. |
| 2 | + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. |
3 | 3 | * |
4 | 4 | * All rights reserved. |
5 | 5 | * |
@@ -57,100 +57,6 @@ bool truffle_cannot_be_handle(void *nativeHandle); |
57 | 57 | // wrapping functions |
58 | 58 | void *truffle_decorate_function(void *function, void *wrapper); |
59 | 59 |
|
60 | | -/* |
61 | | - * All function below here are deprecated and will be removed in a future release. |
62 | | - * Use the equivalent functions from <polyglot.h> instead. |
63 | | - */ |
64 | | - |
65 | | -void *truffle_import(const char *name); // renamed to polyglot_import |
66 | | -void *truffle_import_cached(const char *name); // no replacement, use polyglot_import |
67 | | - |
68 | | -void *truffle_address_to_function(void *address); // deprecated, does nothing |
69 | | - |
70 | | -void *truffle_get_arg(int i); // renamed to polyglot_get_arg |
71 | | - |
72 | | -// Predicates: |
73 | | -bool truffle_is_executable(const void *object); // renamed to polyglot_can_execute |
74 | | -bool truffle_is_null(const void *object); // renamed to polyglot_is_null |
75 | | -bool truffle_has_size(const void *object); // renamed to polyglot_has_array_elements |
76 | | -bool truffle_is_boxed(const void *object); // no replacement |
77 | | -bool truffle_is_truffle_object(const void *object); // renamed to polyglot_is_value |
78 | | - |
79 | | -// Execute: deprecated, use typecast to function pointer instead |
80 | | -void *truffle_execute(void *object, ...); |
81 | | -int truffle_execute_i(void *object, ...); |
82 | | -long truffle_execute_l(void *object, ...); |
83 | | -char truffle_execute_c(void *object, ...); |
84 | | -float truffle_execute_f(void *object, ...); |
85 | | -double truffle_execute_d(void *object, ...); |
86 | | -bool truffle_execute_b(void *object, ...); |
87 | | - |
88 | | -// Invoke: |
89 | | -void *truffle_invoke(void *object, const char *name, ...); // renamed to polyglot_invoke |
90 | | -int truffle_invoke_i(void *object, const char *name, ...); // deprecated, use polyglot_as_i32(polyglot_invoke(...)) |
91 | | -long truffle_invoke_l(void *object, const char *name, ...); // deprecated, use polyglot_as_i64(polyglot_invoke(...)) |
92 | | -char truffle_invoke_c(void *object, const char *name, ...); // deprecated, use polyglot_as_i8(polyglot_invoke(...)) |
93 | | -float truffle_invoke_f(void *object, const char *name, ...); // deprecated, use polyglot_as_float(polyglot_invoke(...)) |
94 | | -double truffle_invoke_d(void *object, const char *name, ...); // deprecated, use polyglot_as_double(polyglot_invoke(...)) |
95 | | -bool truffle_invoke_b(void *object, const char *name, ...); // deprecated, use polyglot_as_boolean(polyglot_invoke(...)) |
96 | | - |
97 | | -// GetSize |
98 | | -int truffle_get_size(const void *object); // renamed to polyglot_get_array_size |
99 | | - |
100 | | -// Unbox |
101 | | -int truffle_unbox_i(void *object); // renamed to polyglot_as_i32 |
102 | | -long truffle_unbox_l(void *object); // renamed to polyglot_as_i64 |
103 | | -char truffle_unbox_c(void *object); // renamed to polyglot_as_i8 |
104 | | -float truffle_unbox_f(void *object); // renamed to polyglot_as_float |
105 | | -double truffle_unbox_d(void *object); // renamed to polyglot_as_double |
106 | | -bool truffle_unbox_b(void *object); // renamed to polyglot_as_boolean |
107 | | - |
108 | | -// Read |
109 | | -void *truffle_read(void *object, const char *name); // renamed to polyglot_get_member |
110 | | -int truffle_read_i(void *object, const char *name); // deprecated, use polyglot_as_i32(polyglot_get_member(...)) |
111 | | -long truffle_read_l(void *object, const char *name); // deprecated, use polyglot_as_i64(polyglot_get_member(...)) |
112 | | -char truffle_read_c(void *object, const char *name); // deprecated, use polyglot_as_i8(polyglot_get_member(...)) |
113 | | -float truffle_read_f(void *object, const char *name); // deprecated, use polyglot_as_float(polyglot_get_member(...)) |
114 | | -double truffle_read_d(void *object, const char *name); // deprecated, use polyglot_as_double(polyglot_get_member(...)) |
115 | | -bool truffle_read_b(void *object, const char *name); // deprecated, use polyglot_as_boolean(polyglot_get_member(...)) |
116 | | - |
117 | | -void *truffle_read_idx(void *object, int idx); // renamed to polyglot_get_array_element |
118 | | -int truffle_read_idx_i(void *object, int idx); // deprecated, use polyglot_as_i32(polyglot_get_array_element(...)) |
119 | | -long truffle_read_idx_l(void *object, int idx); // deprecated, use polyglot_as_i64(polyglot_get_array_element(...)) |
120 | | -char truffle_read_idx_c(void *object, int idx); // deprecated, use polyglot_as_i8(polyglot_get_array_element(...)) |
121 | | -float truffle_read_idx_f(void *object, int idx); // deprecated, use polyglot_as_float(polyglot_get_array_element(...)) |
122 | | -double truffle_read_idx_d(void *object, int idx); // deprecated, use polyglot_as_double(polyglot_get_array_element(...)) |
123 | | -bool truffle_read_idx_b(void *object, int idx); // deprecated, use polyglot_as_boolean(polyglot_get_array_element(...)) |
124 | | - |
125 | | -// Write |
126 | | -void truffle_write(void *object, const char *name, void *value); // renamed to polyglot_put_member |
127 | | -void truffle_write_i(void *object, const char *name, int value); // deprecated, use polyglot_put_member |
128 | | -void truffle_write_l(void *object, const char *name, long value); // deprecated, use polyglot_put_member |
129 | | -void truffle_write_c(void *object, const char *name, char value); // deprecated, use polyglot_put_member |
130 | | -void truffle_write_f(void *object, const char *name, float value); // deprecated, use polyglot_put_member |
131 | | -void truffle_write_d(void *object, const char *name, double value); // deprecated, use polyglot_put_member |
132 | | -void truffle_write_b(void *object, const char *name, bool value); // deprecated, use polyglot_put_member |
133 | | - |
134 | | -void truffle_write_idx(void *object, int idx, void *value); // renamed to polyglot_set_array_element |
135 | | -void truffle_write_idx_i(void *object, int idx, int value); // deprecated, use polyglot_set_array_element |
136 | | -void truffle_write_idx_l(void *object, int idx, long value); // deprecated, use polyglot_set_array_element |
137 | | -void truffle_write_idx_c(void *object, int idx, char value); // deprecated, use polyglot_set_array_element |
138 | | -void truffle_write_idx_f(void *object, int idx, float value); // deprecated, use polyglot_set_array_element |
139 | | -void truffle_write_idx_d(void *object, int idx, double value); // deprecated, use polyglot_set_array_element |
140 | | -void truffle_write_idx_b(void *object, int idx, bool value); // deprecated, use polyglot_set_array_element |
141 | | - |
142 | | -// Strings |
143 | | -void *truffle_read_string(const char *string); // deprecated, use polyglot_from_string instead |
144 | | -void *truffle_read_n_string(const char *string, int n); // deprecated, use polyglot_from_string_n instead |
145 | | -void *truffle_read_bytes(const char *bytes); // deprecated, no replacement |
146 | | -void *truffle_read_n_bytes(const char *bytes, int n); // deprecated, no replacement |
147 | | -const char *truffle_string_to_cstr(const char *string); // deprecated, use polyglot_as_string instead |
148 | | -void truffle_free_cstr(const char *truffle_allocated_cstr); // deprecated, no replacement |
149 | | - |
150 | | -void *truffle_sulong_function_to_native_pointer(void *sulongFunctionPointer, const void *signature); // deprecated, no replacement |
151 | | - |
152 | | -void *truffle_polyglot_eval(const char *mimeType, const char *code); // deprecated, use polyglot_eval instead |
153 | | - |
154 | 60 | #if defined(__cplusplus) |
155 | 61 | } |
156 | 62 | #endif |
|
0 commit comments