1.
luaopen_ffi()
-> lj_ctype_init(L)
-> setmref(G(L)->ctype_state, cts)
-> lj_clib_default(L) # init ffi.C (default libc.so loader)
-> cl = clib_new()
cl->handle = RTLD_DEFAULT
ctype_cts(L)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cd /home/xiaochen.wxc/work/github-xiaochen/tengine-xiaochen | |
$ cat test_nginx.sh | |
TEST_NGINX="/home/xiaochen.wxc/work/github-xiaochen/tengine-xiaochen/tests/test-nginx/test-nginx" | |
export PATH=/home/xiaochen.wxc/work/github-xiaochen/tengine-xiaochen/objs:$PATH | |
prove -v -I $TEST_NGINX/inc -I $TEST_NGINX/lib \ | |
tests/test-nginx/cases/footer.t \ | |
tests/test-nginx/cases/proxy_no_buffering_chunked.t \ | |
tests/test-nginx/cases/proxy_no_buffering.t \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
numbers: | |
:%s/[0-9]\+/<something>/gc | |
strings: | |
:%s/[a-zA-Z]\+/<something>/gc | |
parentheses: | |
:%s/[\[\]{}()<>]\+/<something>/gc | |
special characters: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> def test(a, b): | |
... print a, b | |
... | |
>>> test('hello', 'world') | |
hello world | |
>>> test(*('hello', 'world')) # tuple | |
hello world | |
>>> test(*iter(['hello', 'world'])) # iter | |
hello world | |
>>> test(*['hello', 'world']) # list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> class A(): | |
... val = 0 | |
... | |
>>> a = A() | |
>>> a.val, a = 1, a.val # right | |
>>> a = A() | |
>>> a, a.val = a.val, 1 # wrong | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
AttributeError: 'int' object has no attribute 'val' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gc | |
class A(): | |
# For Python, finalizers means instance objects with __del__ methods. | |
def __del__(self): | |
pass | |
print gc.garbage | |
# [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The available and post_available field of structure ngx_event_t is only used by KQUEUE. | |
Other event modules (epoll, poll and etc) donest care about it. | |
For read event, available means size of data ready to read. | |
For read event(listening event), available means size of listen backlog. | |
post_avalibale is only used for multi-thread & KQUEUE. | |
multi_accept directive doesn't matter for kqueue. (see http://forum.nginx.org/read.php?2,3638,3661) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Used for python 3.3+ | |
# API: decompress, compress | |
# zlib dictionary support for python: http://bugs.python.org/issue14684 | |
# | |
# For test: | |
# $ python3 spdy_zlib.py | |
import zlib | |
spdy_v2_dict = b'''\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mail message modified: | |
Xiaochen Wang <wangxiaochen0@gmail.com> | |
11:07 AM (2 hours ago) | |
to web-07 | |
hi mike, | |
We still have an issue, always crashed on first instruction of tracing generated machine code. |
- details for alibaba/tengine#1105
- Case failure:
- sub_filter_slice.t: current tengine has its slice module, so this case is not run for nginx module.
- limit_conn_complex.t: limit_req module is not updated.
- index2.t: current tengine does not merge http://hg.nginx.org/nginx/rev/d91a8c4ac6bb.
- userid.t: tengine refactor 404 page. It outputs URI in response, the URI has "expires" string, which makes case failed.
OlderNewer