NodeJS N-API руководство: различия между версиями

Материал из support.qbpro.ru
imported>Supportadmin
Нет описания правки
imported>Supportadmin
Строка 15: Строка 15:


==Простые типы данных N-API==
==Простые типы данных N-API==
napi_status - Indicates the success or failure of a N-API call.
*napi_status - Indicates the success or failure of a N-API call.
napi_env - Is to represent a context to persist VM-specific state.
*napi_env - Is to represent a context to persist VM-specific state.
napi_value - To represent JavaScript value.
*napi_value - To represent JavaScript value.
napi_extended_error_info - To represent all the error occurred.
*napi_extended_error_info - To represent all the error occurred.
napi_handle_scope - Control and Modify the lifetime of objects created within a particular scope.
*napi_handle_scope - Control and Modify the lifetime of objects created within a particular scope.
napi_callback_info - Get the information about the context of callback.
*napi_callback_info - Get the information about the context of callback.

Версия от 22:26, 8 ноября 2017

На данный момент (сегодня 07-11-2017) в сети нет толкового руководства на тему N-API в NodeJS.

Здесь собираю крохи:

N-API и начнем с написания C аддона для Node.js

источник

Простые типы данных N-API

  • napi_status - Indicates the success or failure of a N-API call.
  • napi_env - Is to represent a context to persist VM-specific state.
  • napi_value - To represent JavaScript value.
  • napi_extended_error_info - To represent all the error occurred.
  • napi_handle_scope - Control and Modify the lifetime of objects created within a particular scope.
  • napi_callback_info - Get the information about the context of callback.