本博客注有“转”字样的为转载文章,其余为本人原创文章,转载请务必注明出处或保存此段。c++/lua/windows逆向交流群:69148232

每一个lua api 函数结尾都给出了这样的说明例如:

[-0, +1, –]

这是什么意思呢。

方括号里面有三个字段我们称为[-o, +p, x]

第一个字段o表示调用函数后会从栈中弹出多少个元素
第二个字段p表示调用函数后会压入多少元素到栈中
如果o或p这两个字段的格式是x|y类型表示这调用这个函数会压入(弹出)栈的个数x或者y个。他是根据不同情况的。
如果o或p中带有?表示我不知道将会压入(弹出)多少个元素,要视具体参数而定。
第三个字段x表示这个函数是否会抛出异常。“-”代表些函数从来不会抛出异常。“m”表示这个函数会抛出内存溢出异常或错误执行__gc函数。'e'代表这个函数有可能抛出异常。‘v’表示这个函数会抛出一个错误。

例如:

void lua_settable (lua_State *L, int index); [-2, +0, e]

[-2, +0, e] 有球settable会弹出2个元素压入0个元素,这个函数会抛出错误。

Here we list all functions and types from the C API in alphabetical order. Each function has an indicator like this:[-o, +p, x]

The first field, o, is how many elements the function pops from the stack. The second field, p, is how many elements the function pushes onto the stack. (Any function always pushes its results after popping its arguments.) A field in the form x|y means the function can push (or pop) x or y elements, depending on the situation; an interrogation mark '?' means that we cannot know how many elements the function pops/pushes by looking only at its arguments (e.g., they may depend on what is on the stack). The third field, x, tells whether the function may raise errors: '-' means the function never raises any error; 'm' means the function may raise out-of-memory errors and errors running a __gc metamethod; 'e' means the function may raise any errors (it can run arbitrary Lua code, either directly or through metamethods); 'v' means the function may raise an error on purpose.

lua api 官方文档 函数后面的方括号 说明 [-0, +0, –]的更多相关文章

  1. SolrJ API 官方文档最佳实践

    以下内容译自Solr Wiki官方文档,版权没有,随意转载. Solrj 是一个访问solr的Java客户端.它提供了一个java接口用于添加更新和查询solr索引.本页面介绍SolrJ最新版本1.4 ...

  2. 《Spark Python API 官方文档中文版》 之 pyspark.sql (二)

    摘要:在Spark开发中,由于需要用Python实现,发现API与Scala的略有不同,而Python API的中文资料相对很少.每次去查英文版API的说明相对比较慢,还是中文版比较容易get到所需, ...

  3. 《Spark Python API 官方文档中文版》 之 pyspark.sql (四)

    摘要:在Spark开发中,由于需要用Python实现,发现API与Scala的略有不同,而Python API的中文资料相对很少.每次去查英文版API的说明相对比较慢,还是中文版比较容易get到所需, ...

  4. 《Spark Python API 官方文档中文版》 之 pyspark.sql (三)

    摘要:在Spark开发中,由于需要用Python实现,发现API与Scala的略有不同,而Python API的中文资料相对很少.每次去查英文版API的说明相对比较慢,还是中文版比较容易get到所需, ...

  5. Restful API官方文档

    理解Restful架构:http://www.ruanyifeng.com/blog/2011/09/restful RESTful设计指南:http://www.ruanyifeng.com/blo ...

  6. 《Spark Python API 官方文档中文版》 之 pyspark.sql (一)

    摘要:在Spark开发中,由于需要用Python实现,发现API与Scala的略有不同,而Python API的中文资料相对很少.每次去查英文版API的说明相对比较慢,还是中文版比较容易get到所需, ...

  7. 【Android API】Android 4.1 API官方文档详解

    原文:http://android.eoe.cn/topic/summary 翻译:[eoeAndroid原创团队]kris.流风而逝.贼寇在何方.snowxwyo.lsy4833406 更新日期:2 ...

  8. Search API 官方文档 可以用了查看自己的app

    Search API October 24, 2012 - HTTPS is now supported for Search and Lookup requests. Please update y ...

  9. ElasticSearch(6.2.2)的java API官方文档的总结 (三)

    一 : SearchRequest用于任何与搜索文档,聚合和建议有关的操作,并且还提供了对生成的文档进行高亮显示的方法. 在最基本的形式中,我们可以向请求添加一个查询:    1:添加一个Search ...

随机推荐

  1. ORM数据库框架 SQLite 常用数据库框架比较 MD

    Markdown版本笔记 我的GitHub首页 我的博客 我的微信 我的邮箱 MyAndroidBlogs baiqiantao baiqiantao bqt20094 baiqiantao@sina ...

  2. TNTSearch 轻量级全文索引 + 中文分词

    TNTSearch 轻量级全文索引+中文分词 选用 TNTSearch 的原因:轻,方便移植,不需要额外安装服务,能减少后期维护的工作量.搜索的效果也还不错,可以满足大多数项目场景,如果对性能和精准度 ...

  3. Kafka:ZK+Kafka+Spark Streaming集群环境搭建(十八)ES6.2.2 增删改查基本操作

    #文档元数据 一个文档不仅仅包含它的数据 ,也包含 元数据 —— 有关 文档的信息. 三个必须的元数据元素如下:## _index    文档在哪存放 ## _type    文档表示的对象类别 ## ...

  4. MySQL数据复制到其他主机时报错

    问题1: MySQL server has gone away With statement 原因:SQl insert 插入的语句天长导致 问题2:mysql a bulk size specifi ...

  5. 整数对A满足二叉查找树,B满足最大堆

    1 题目 给出一组整数对 { (a[0], b[0]), (a[1], b[1]) ... (a[n-1], b[n-1]) },全部 a 值和 b 值分别不反复(随意 i != j 满足 a[i] ...

  6. String escape/unescape into XML

    Is there any C# function which could be used to escape and un-escape a string, which could be used t ...

  7. HDU 1541 Stars (线段树)

     Problem Description Astronomers often examine star maps where stars are represented by points on ...

  8. PyCharm安装第三方库如Requests

    转载: https://blog.csdn.net/fx677588/article/details/56830929 PyCharm安装第三方库是十分方便的,无需pip或其他工具,平台就自带了这个功 ...

  9. iOS 生成pem证书

    openssl pkcs12 -in Certificates.p12 -out Certificates.pem -nodes     需要通过终端命令将这些文件转换为PEM格式:openssl p ...

  10. 安装和测试Kafka(转)

    http://blog.javachen.com/2015/03/17/install-and-test-kafka/# 本文主要介绍如何在单节点上安装 Kafka 并测试 broker.produc ...