Logo Search packages:      
Sourcecode: icu version File versions  Download package

U_DRAFT UCalendar* U_EXPORT2 ucal_clone ( const UCalendar cal,
UErrorCode status 
)

Open a copy of a UCalendar. This function performs a deep copy.

Parameters:
calThe calendar to copy
statusA pointer to an UErrorCode to receive any errors.
Returns:
A pointer to a UCalendar identical to cal. ICU 4.0

Definition at line 156 of file ucal.cpp.

References Calendar::clone(), U_FAILURE, and U_MEMORY_ALLOCATION_ERROR.

{
  if(U_FAILURE(*status)) return 0;
  
  Calendar* res = ((Calendar*)cal)->clone();

  if(res == 0) {
    *status = U_MEMORY_ALLOCATION_ERROR;
    return 0;
  }

  return (UCalendar*) res;
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index