Remove deprecated native handle support. (#2496)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2018-08-29 12:51:37 +02:00
committed by GitHub
parent b4dc6b0cbe
commit 7d41d38e3c
9 changed files with 32 additions and 295 deletions
-114
View File
@@ -334,20 +334,6 @@ typedef jerry_value_t (*jerry_external_handler_t) (const jerry_value_t function_
const jerry_length_t args_count);
```
## jerry_object_free_callback_t
**Summary**
**Deprecated: Please use jerry_object_native_free_callback_t instead.**
Native free callback of an object.
**Prototype**
```c
typedef void (*jerry_object_free_callback_t) (const uintptr_t native_p);
```
## jerry_object_native_free_callback_t
**Summary**
@@ -4387,106 +4373,6 @@ jerry_set_prototype (const jerry_value_t obj_val,
- [jerry_get_prototype](#jerry_get_prototype)
## jerry_get_object_native_handle
**Summary**
**Deprecated: Please use jerry_get_object_native_pointer instead.**
Get native handle, previously associated with specified object.
**Prototype**
```c
bool
jerry_get_object_native_handle (const jerry_value_t obj_val,
uintptr_t *out_handle_p);
```
- `obj_val` - object value
- `out_handle_p` - handle value (output parameter).
- return value
- true, if there is handle associated with the object
- false, otherwise
**Example**
```c
{
jerry_value_t object;
uintptr_t handle_set;
... // receive or construct object and handle_set value
jerry_set_object_native_handle (object, handle_set, NULL);
...
uintptr_t handle_get;
bool is_there_associated_handle = jerry_get_object_native_handle (object, &handle_get);
}
```
**See also**
- [jerry_create_object](#jerry_create_object)
- [jerry_set_object_native_handle](#jerry_set_object_native_handle)
- [jerry_get_object_native_pointer](#jerry_get_object_native_pointer)
## jerry_set_object_native_handle
**Summary**
**Deprecated: Please use jerry_set_object_native_pointer instead.**
Set native handle and an optional free callback for the specified object.
*Note*: If native handle was already set for the object, its value is updated.
*Note*: If a non-NULL free callback is specified, it will be called
by the garbage collector when the object is freed. The free
callback always overwrites the previous value, so passing
a NULL value deletes the current free callback.
**Prototype**
```c
void
jerry_set_object_native_handle (const jerry_value_t obj_val,
uintptr_t handle_p,
jerry_object_free_callback_t freecb_p);
```
- `obj_val` - object value to set handle in
- `handle_p` - handle value
- `freecb_p` - pointer to "free" callback or NULL
**Example**
```c
{
jerry_value_t object;
uintptr_t handle_set;
... // receive or construct object and handle_set value
jerry_set_object_native_handle (object, handle_set, NULL);
...
uintptr_t handle_get;
bool is_there_associated_handle = jerry_get_object_native_handle (object, &handle_get);
}
```
**See also**
- [jerry_create_object](#jerry_create_object)
- [jerry_get_object_native_handle](#jerry_get_object_native_handle)
- [jerry_set_object_native_pointer](#jerry_set_object_native_pointer)
## jerry_get_object_native_pointer
**Summary**