API C types

Duktape API uses typedef-wrapped C types such as duk_int_t, duk_idx_t, and duk_ret_t almost exclusively to ensure portability to exotic platforms. On most platforms these map directly to signed or unsigned int; the wrappers make it possible to support platforms where usual type assumptions (like having a 32-bit int) don't hold. See Wiki article API C types for a detailed discussion.

Summary of best practices: