本博客注有“转”字样的为转载文章,其余为本人原创文章,转载请务必注明出处或保存此段。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. jquery实现上传文件大小类型的验证

    <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...

  2. Using Timers in MFC Applications

    Timer Events in MFC Applications Event timers are always handy to have around and useful in nearly e ...

  3. CSS中的图片路径问题

      CSS中的背景图片写了相对路径,为什么不显示那?   [解决方法] CSS中的背景图片路径应该写成相对于当前CSS文件的路径,而不是针对网站根目录的相对路径.

  4. Java集合遍历时删除

    public static void main(String[] args){ List<Integer> list = new ArrayList<Integer>(); l ...

  5. JavaScript代码不执行

    一天先后有两个同事问我为啥他的js代码出现了莫名其妙的问题 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "h ...

  6. ASP入门(十六)-ASP开发的规范

    毋容置疑,在开发中遵守一套规范,将会有利于提高代码的可读性,较低后期维护成本. 文件存放目录规范 js 目录下存放着页面所使用的 JavaScript 脚本文件,因为我们可能用到第三方提供的免费的 J ...

  7. cyml

    bin/kafka-topics.sh --create --replication-factor 1 --partitions 1 --topic mc_logger2 --zookeeper lo ...

  8. Persistent Netcat Backdoor

    In this example, instead of looking up information on the remote system, we will be installing a net ...

  9. 带你走进EJB--将EJB发布为Webservice(4)

    接下来的我们将会自定义一个对象,然后看看EJB是如何对复杂的参数发布成WebService的. 代码如下:在第一个版本的基础之上加上增加用户的方法,参数为User. package com.tgb.e ...

  10. C# FTP常规方法

    using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using Sy ...