Development

重新设计了d的一组API

| Development

将个性化的factory提取出来,改为使用通用的factory生成同一协议的protocol对象,并将业务逻辑对象作为factory的一个参数。这样做使得代码冗余大大降低了。

参与评论

GBQ 18030出2005版了

| Development

2005年底发布的信息技术新国标中有GB18030-2005,这是取代GB18030-2000的新的强制性标准。

参与评论

看来应该给BSD的*.mk写份详细点的文档了……

| Development

现在的人多半受了POSIX的毒害,不会写Makefile。另外,居然有很多人以为用autoconf的configure生成的那种1M的破玩意是一件很牛的事情……拜托啊,Makefile也是可以设计的,没有能力写Makefile的人才自动生成呢。

参与评论

赞一个csh……

| Development

以前一直以为不行的,今天仔细看了一下manpage:

如欲让sysctl之后能使用tab补齐,则应使用:

complete sysctl ’n/*/`sysctl -Na`/'

试了一下,不错!

参与评论

Another serious memory leak in python-ldap

| Development

I have submitted another patch for python-ldap. This time it’s error path.

参与评论

Python 2.4.3 RC1

| Development

So Python will release the bugfix release, 2.4.3. Now they have released the RC1 as a release candidate, with more than 50 bugfixes!

参与评论

终于抓住了py-ldap中的内存泄漏!!

| Development

之前曾经误认为 Python中存在内存泄漏,不过最终证明还是C程序的问题。Py-LDAP2这个模块在某些情况下,会泄漏一个空的List,具体泄漏代码如下:

retval = Py_BuildValue("(OOiO)", result_str, pmsg, res_msgid, pyctrls ? pyctrls : PyList_New(0));

当pyctrls == NULL时,Py_BuildValue()会为PyList_New(0)生成的那个对象再增加一个引用,这样会导致泄漏。这一问题会发生于调用result()而all=0的情形。

阅读全文…( 本文约 196 字,阅读大致需要 1 分钟 )

My misunderstanding of OpenLDAP API

| Development

I used to think that ldap_unbind() is the opposite of ldap_bind(), however I was wrong. Pierangelo Masarati (ando at openldap) pointed out that it was actually opposite of ldap_init(). So, do NOT expect init() -> bind() -> search() -> unbind() -> bind() would success, it’s simply wrong thing. You do not need to unbind() before you do another bind().

Just make a note.

参与评论

漏啊,漏啊

| Development

今天给某个维护OpenLDAP相关port的老大提了几个patch,等他消息了。

另外就是Python自己也会有泄漏,而且居然是gc部分自己出了许多tuple,这年头:(

参与评论

FreeBSD src Makefile大手术

| Development

Ruslan Ermilov大长辈commit了一组Makefile变动。这包含了许多来自NetBSD和FreeBSD ports的特性。

感觉比之前要清晰许多。

参与评论