Add 'type' argument to set/get native handle API (#1711)
Ecma-object have native handle type inside, and binding code could use type info to validate native handle's type. Related issue #1681 JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
This commit is contained in:
@@ -195,6 +195,28 @@ typedef int32_t ecma_integer_value_t;
|
||||
*/
|
||||
typedef uintptr_t ecma_external_pointer_t;
|
||||
|
||||
/**
|
||||
* Representation for native handle package.
|
||||
*
|
||||
* Note: It is for the deprecated api:
|
||||
* jerry_get_object_native_handle and jerry_set_object_native_handle
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ecma_external_pointer_t handle_p; /**< points to the external native object */
|
||||
ecma_external_pointer_t free_cb; /**< free callback of the native handle */
|
||||
} ecma_native_handle_package_t;
|
||||
|
||||
/**
|
||||
* Representation of the native pointer package.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
ecma_external_pointer_t native_p; /**< points to the external native object */
|
||||
ecma_external_pointer_t info_p; /**< type info of the native pointer */
|
||||
} ecma_native_pointer_package_t;
|
||||
|
||||
/**
|
||||
* Special property identifiers.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user