Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions | Variables
nsSubstring.cpp File Reference
#include <stdlib.h>
#include "nsSubstring.h"
#include "nsString.h"
#include "nsStringBuffer.h"
#include "nsDependentString.h"
#include "nsMemory.h"
#include "pratom.h"
#include "string-template-def-unichar.h"
#include "nsTSubstring.cpp"
#include "string-template-undef.h"
#include "string-template-def-char.h"

Go to the source code of this file.

Classes

class  nsAStringAccessor
class  nsACStringAccessor

Defines

#define STRING_STAT_INCREMENT(_s)

Functions

void ReleaseData (void *data, PRUint32 flags)

Variables

static const PRUnichar gNullChar = 0

Define Documentation

Definition at line 106 of file nsSubstring.cpp.


Function Documentation

void ReleaseData ( void data,
PRUint32  flags 
) [inline]

Definition at line 112 of file nsSubstring.cpp.

  {
    if (flags & nsSubstring::F_SHARED)
      {
        nsStringBuffer::FromData(data)->Release();
      }
    else if (flags & nsSubstring::F_OWNED)
      {
        nsMemory::Free(data);
        STRING_STAT_INCREMENT(AdoptFree);
      }
    // otherwise, nothing to do.
  }

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

const PRUnichar gNullChar = 0 [static]

Definition at line 57 of file nsSubstring.cpp.