Re: cvs: php4 /ext/shmop php_shmop.h shmop.c
| From: | Andi Gutmans | Date: | Thu, 19 Oct 2000 23:02:26 +0000 |
| Subject: | Re: cvs: php4 /ext/shmop php_shmop.h shmop.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-2142@lists.php.net to get a copy of this message | ||
I just realized this extension is like two weeks old and you're already adding aliases for backwards compatibility. This is really bad and the only reason we have aliases is for when they are REALLY needed.
I suggest reverting your patch, or if you really feel uncomfortable with the previous names (which seem quite OK) then change them. I doubt there are many people using these functions already. But I personally think it's best to leave them the way they were.
Andi
At 10:50 PM 10/19/00 +0000, Derick Rethans wrote:
--- Andi Gutmans <andi@zend.com> http://www.zend.com/derick Thu Oct 19 15:50:41 2000 EDTModified files:/php4/ext/shmop php_shmop.h shmop.cLog: - Renamed the shm_ to shmop_ and created aliases for the old shm_functions@- Renamed the shm_* functions to shmop_* and added aliases for the @ old functions (Derick) Index: php4/ext/shmop/php_shmop.h diff -u php4/ext/shmop/php_shmop.h:1.2 php4/ext/shmop/php_shmop.h:1.3--- php4/ext/shmop/php_shmop.h:1.2 Sat Oct 7 13:46:30 2000+++ php4/ext/shmop/php_shmop.h Thu Oct 19 15:50:41 2000 @@ -36,12 +36,12 @@ PHP_RSHUTDOWN_FUNCTION(shmop); PHP_MINFO_FUNCTION(shmop); -PHP_FUNCTION(shm_open); -PHP_FUNCTION(shm_read); -PHP_FUNCTION(shm_close); -PHP_FUNCTION(shm_size); -PHP_FUNCTION(shm_write); -PHP_FUNCTION(shm_delete); +PHP_FUNCTION(shmop_open); +PHP_FUNCTION(shmop_read); +PHP_FUNCTION(shmop_close); +PHP_FUNCTION(shmop_size); +PHP_FUNCTION(shmop_write); +PHP_FUNCTION(shmop_delete); struct php_shmop { Index: php4/ext/shmop/shmop.c diff -u php4/ext/shmop/shmop.c:1.3 php4/ext/shmop/shmop.c:1.4 --- php4/ext/shmop/shmop.c:1.3 Wed Oct 11 03:46:53 2000+++ php4/ext/shmop/shmop.c Thu Oct 19 15:50:41 2000@@ -36,12 +36,19 @@ /* Every user visible function must have an entry in shmop_functions[]. */ function_entry shmop_functions[] = {- PHP_FE(shm_open, NULL) - PHP_FE(shm_read, NULL) - PHP_FE(shm_close, NULL) - PHP_FE(shm_size, NULL) - PHP_FE(shm_write, NULL) - PHP_FE(shm_delete, NULL) + PHP_FE(shmop_open, NULL) + PHP_FE(shmop_read, NULL) + PHP_FE(shmop_close, NULL) + PHP_FE(shmop_size, NULL) + PHP_FE(shmop_write, NULL) + PHP_FE(shmop_delete, NULL)++ PHP_FALIAS(shm_open, shmop_open, NULL) + PHP_FALIAS(shm_read, shmop_read, NULL) + PHP_FALIAS(shm_close, shmop_close, NULL) + PHP_FALIAS(shm_size, shmop_size, NULL) + PHP_FALIAS(shm_write, shmop_write, NULL) + PHP_FALIAS(shm_delete, shmop_delete, NULL) {NULL, NULL, NULL} /* Must be the last line in shmop_functions[] */}; @@ -87,9 +94,9 @@php_info_print_table_end();} -/* {{{ proto int shm_open (int key, int flags, int mode, int size) - shm_open - gets and attaches a shared memory segment */ -PHP_FUNCTION(shm_open) +/* {{{ proto int shmop_open (int key, int flags, int mode, int size) + shmop_open - gets and attaches a shared memory segment */ +PHP_FUNCTION(shmop_open) {zval **key, **flags, **mode, **size; struct php_shmop *shmop;@@ -154,9 +161,9 @@ /* }}} */ -/* {{{ proto string shm_read (int shmid, int start, int count) - shm_read - reads from a shm segment */ -PHP_FUNCTION(shm_read) +/* {{{ proto string shmop_read (int shmid, int start, int count) + shmop_read - reads from a shm segment */ +PHP_FUNCTION(shmop_read) {zval **shmid, **start, **count; struct php_shmop *shmop;@@ -206,9 +213,9 @@ /* }}} */ -/* {{{ proto void shm_close (int shmid) - shm_close - closes a shared memory segment */ -PHP_FUNCTION(shm_close) +/* {{{ proto void shmop_close (int shmid) + shmop_close - closes a shared memory segment */ +PHP_FUNCTION(shmop_close) {zval **shmid; struct php_shmop *shmop;@@ -231,9 +238,9 @@ /* }}} */ -/* {{{ proto int shm_size (int shmid) - shm_size - returns the shm size */ -PHP_FUNCTION(shm_size) +/* {{{ proto int shmop_size (int shmid) + shmop_size - returns the shm size */ +PHP_FUNCTION(shmop_size) {zval **shmid; struct php_shmop *shmop;@@ -257,9 +264,9 @@ /* }}} */ -/* {{{ proto int shm_write (int shmid, string data, int offset) - shm_write - writes to a shared memory segment */ -PHP_FUNCTION(shm_write) +/* {{{ proto int shmop_write (int shmid, string data, int offset) + shmop_write - writes to a shared memory segment */ +PHP_FUNCTION(shmop_write) {zval **shmid, **data, **offset; struct php_shmop *shmop;@@ -294,9 +301,9 @@ /* }}} */ -/* {{{ proto bool shm_delete (int shmid) - shm_delete - mark segment for deletion */ -PHP_FUNCTION(shm_delete) +/* {{{ proto bool shmop_delete (int shmid) + shmop_delete - mark segment for deletion */ +PHP_FUNCTION(shmop_delete) {zval **shmid; struct php_shmop *shmop;-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-cvs-unsubscribe@lists.php.net For additional commands, e-mail: php-cvs-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net