FW: Regarding Collator Object Cleanup

View: New views
2 Messages — Rating Filter:   Alert me  

FW: Regarding Collator Object Cleanup

by Hardik Patel-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

FYI

 

  _____  

From: Hardik Patel [mailto:hardik@...]
Sent: Tuesday, August 28, 2007 3:48 AM
To: 'Vadim Savchuk'
Cc: 'Hardik Patel'
Subject: RE: Regarding Collator Object Cleanup

 

Ah!

 

After checking latest source code of php extension, I got 1 place where
ucol_close() is invoked (within collator_object_destroy).

 

I am just concerned whether this be called for both object oriented usage as
well as procedural usage?

 

I mean, will this be called in following cases;

 

a)       While using *collator_create()* API - Procedural approach

b)      While using *new Collator("en_US")* API - OO approach

 

Thanks,
Hardik

 

  _____  

From: Hardik Patel [mailto:hardik@...]
Sent: Tuesday, August 28, 2007 3:35 AM
To: 'Vadim Savchuk'
Subject: Regarding Collator Object Cleanup

 

Hi Vadim,

 

(Hope you are the right person to pose this query)

 

I went through PHP extension's code (which in turn uses ICU collation C
APIs). This is what I observed:

 

a)       There are two APIs that invoke ucol_open() of ICU library. They
are: *PHP_METHOD( Collator, __construct )* and *PHP_FUNCTION(
collator_create )*

 

I was not able to find a place where ucol_close() is called by extension
code. Could you point me to the place in your extension code that invokes
ucol_close() or does the cleanup job (both for procedural and OO approach)?

(needed to ensure graceful cleanup of ICU collator objects)

 

 

Thanks,
Hardik


Re: FW: Regarding Collator Object Cleanup

by Stanislav Malyshev :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Both APIs use the same objects, they just use it in a different way - OO
functions get it as $this, while procedural ones get it as a parameter.

--
Stanislav Malyshev, Zend Software Architect
stas@...   http://www.zend.com/
(408)253-8829   MSN: stas@...

--
PHP Unicode & I18N Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php