Re: Lowercase or camelcase function names?

From: Date: Mon, 07 Nov 2011 00:39:36 +0000
Subject: Re: Lowercase or camelcase function names?
References: 1 2 3 4  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-8817@lists.php.net to get a copy of this message
Hello Johannes, On Mon, 07 Nov 2011 01:16:24 +0100 Johannes Schlüter <johannes@schlueters.de> wrote: > Hi, > > On Mon, 2011-11-07 at 00:35 +0100, Hannes wrote: > > Hello Johannes, > > > > you didn't answer my question... CamelCase or not?? ;) But anyway, thank > > you for your quick reply. :D > > Wasn't sure what to answer there ;-) I will try lowercase... could be changed if needed... > Some small comments, without really deep into it: > * pval isn't used anymore, I think it was even dropped with 5.3. > zval is the exact same. > * The PARSE_ARGS and ARG macros use an old dangerous, bad API. > Look into using zend_parse_parameters (see > README.PARAMETER_PARSING in php src) > * The current code does ARG(0)->value.lval, this should be > Z_LVAL_P(ARG(0)), while that call is, at least in > scard_release_context, unsafe, zend_parse_parameters fixes that, > though) > * Our CODING_STYLE asks for {} for every if clause etc. even when > it's just a single line, the opening { should be on the same > line as the "if" (or "while", "do", ..) > * I assume there are some leaks, make sure to build PHP with > --enable-debug > * The CREDITS file should be two lines, first line extension name, > second line author names. This is afaik used by the Windows > build. It would also be used to create phpcredits() if this > extension was to be bundled with PHP (which I don't expect to > happen) > * build.shlooks weird, phpize && ./configure && make should do all > the things needed, else config.m4 is wrong. > * php_pcsc.h should be as sparse as possible, as for a static > build it is included from main/builtin_functions.h which causes > conflicts. > * TODO: "Make the PCSC context a global var" - this sounds weird. > Global variables often cause issues. > > This long list might look worse than it is, the only first 3 items > "matter" :-) I will work thrue all items in the next days. I knew there where "depricated" stuff in my code. Johann wrote the extension for PHP4 and much of the code is "Copy & Paste". Therefore, thank you very much for your hints and suggestions!!!! It helped me! I am willing to learn and thankful to everybody supporting me. The CREDITS file should not be a problem... ;) build.sh is very old. It was my first try to compile PECL stuff and didn't knew it better. TODO... I don't know why the entry about the global var is written down there. :/ I will check that and will try to figure out what I thought about one year ago... ;) > > The code is based on an extension by Johann Dantant called SCardSCR[2]. > > My project is found on my personal website[3]. Johann allowed me to > > relicense his code unter the terms of the PHP license, so I want > > to use this license! > > Great. (I read GPL somewhere, that would not work, GPL and PHP License > can't be mixed) Yes, I know... I love GPL code but BSD style is very nice too. :D Again, thank you very much! Regards, Johannes

« previous php.pecl.dev (#8817) next »