Changeset 34598 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Jun 16, 2008, 6:39:59 AM (17 years ago)
Author:
[email protected]
Message:

(JavaScriptCore) minidom uses C++ style comments

https://bugs.webkit.org/show_bug.cgi?id=19557

Use only C style comments in minidom sources

Reviewed by Sam.

Location:
trunk/JavaScriptCore
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/JSNode.c

    r29991 r34598  
    1 // -*- mode: c++; c-basic-offset: 4 -*-
     1/* -*- mode: c; c-basic-offset: 4 -*- */
    22/*
    33 * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
     
    3939    UNUSED_PARAM(function);
    4040
    41     // Example of throwing a type error for invalid values
     41    /* Example of throwing a type error for invalid values */
    4242    if (!JSValueIsObjectOfClass(context, thisObject, JSNode_class(context))) {
    4343        JSStringRef message = JSStringCreateWithUTF8CString("TypeError: appendChild can only be called on nodes");
     
    6161{
    6262    UNUSED_PARAM(function);
    63    
    64     // Example of ignoring invalid values
     63
     64    /* Example of ignoring invalid values */
    6565    if (argumentCount > 0) {
    6666        if (JSValueIsObjectOfClass(context, thisObject, JSNode_class(context))) {
  • trunk/JavaScriptCore/API/JSNode.h

    r29663 r34598  
    1 // -*- mode: c++; c-basic-offset: 4 -*-
     1/* -*- mode: c; c-basic-offset: 4 -*- */
    22/*
    33 * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
     
    3636extern JSObjectRef JSNode_construct(JSContextRef context, JSObjectRef object, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
    3737
    38 #endif // JSNode_h
     38#endif /* JSNode_h */
  • trunk/JavaScriptCore/API/JSNodeList.c

    r29991 r34598  
    1 // -*- mode: c++; c-basic-offset: 4 -*-
     1/* -*- mode: c; c-basic-offset: 4 -*- */
    22/*
    33 * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
     
    7373    double index = JSValueToNumber(context, JSValueMakeString(context, propertyName), exception);
    7474    unsigned uindex = (unsigned)index;
    75     if (uindex == index) { // false for NaN
     75    if (uindex == index) { /* false for NaN */
    7676        Node* node = NodeList_item(nodeList, uindex);
    7777        if (node)
  • trunk/JavaScriptCore/API/JSNodeList.h

    r29663 r34598  
    1 // -*- mode: c++; c-basic-offset: 4 -*-
     1/* -*- mode: c; c-basic-offset: 4 -*- */
    22/*
    33 * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
     
    3333extern JSObjectRef JSNodeList_new(JSContextRef, NodeList*);
    3434
    35 #endif // JSNodeList_h
     35#endif /* JSNodeList_h */
  • trunk/JavaScriptCore/API/Node.c

    r29672 r34598  
    1 // -*- mode: c++; c-basic-offset: 4 -*-
     1/* -*- mode: c; c-basic-offset: 4 -*- */
    22/*
    33 * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
     
    5050void Node_removeChild(Node* node, Node* child)
    5151{
    52     // Linear search from tail -- good enough for our purposes here
     52    /* Linear search from tail -- good enough for our purposes here */
    5353    NodeLink* current;
    5454    NodeLink** currentHandle;
     
    6565void Node_replaceChild(Node* node, Node* newChild, Node* oldChild)
    6666{
    67     // Linear search from tail -- good enough for our purposes here
     67    /* Linear search from tail -- good enough for our purposes here */
    6868    NodeLink* current;
    6969    for (current = node->childNodesTail; current; current = current->prev) {
  • trunk/JavaScriptCore/API/Node.h

    r29663 r34598  
    1 // -*- mode: c++; c-basic-offset: 4 -*-
     1/* -*- mode: c++; c-basic-offset: 4 -*- */
    22/*
    33 * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
     
    4949extern void Node_replaceChild(Node* node, Node* newChild, Node* oldChild);
    5050
    51 #endif // Node_h
     51#endif /* Node_h */
  • trunk/JavaScriptCore/API/NodeList.c

    r29672 r34598  
    1 // -*- mode: c++; c-basic-offset: 4 -*-
     1/* -*- mode: c++; c-basic-offset: 4 -*- */
    22/*
    33 * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
     
    3232{
    3333    Node_ref(parentNode);
    34    
     34
    3535    NodeList* nodeList = (NodeList*)malloc(sizeof(NodeList));
    3636    nodeList->parentNode = parentNode;
     
    4141extern unsigned NodeList_length(NodeList* nodeList)
    4242{
    43     // Linear count from tail -- good enough for our purposes here
     43    /* Linear count from tail -- good enough for our purposes here */
    4444    unsigned i = 0;
    4545    NodeLink* n = nodeList->parentNode->childNodesTail;
     
    5757    if (index >= length)
    5858        return NULL;
    59    
    60     // Linear search from tail -- good enough for our purposes here
     59
     60    /* Linear search from tail -- good enough for our purposes here */
    6161    NodeLink* n = nodeList->parentNode->childNodesTail;
    6262    unsigned i = 0;
  • trunk/JavaScriptCore/API/NodeList.h

    r29663 r34598  
    1 // -*- mode: c++; c-basic-offset: 4 -*-
     1/* -*- mode: c++; c-basic-offset: 4 -*- */
    22/*
    33 * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
     
    4141extern void NodeList_deref(NodeList*);
    4242
    43 #endif // NodeList_h
     43#endif /* NodeList_h */
  • trunk/JavaScriptCore/API/minidom.c

    r34273 r34598  
    1 // -*- mode: c++; c-basic-offset: 4 -*-
     1/* -*- mode: c; c-basic-offset: 4 -*- */
    22/*
    33 * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
     
    114114    while (!feof(f) && !ferror(f)) {
    115115        buffer_size += fread(buffer + buffer_size, 1, buffer_capacity - buffer_size, f);
    116         if (buffer_size == buffer_capacity) { // guarantees space for trailing '\0'
     116        if (buffer_size == buffer_capacity) { /* guarantees space for trailing '\0' */
    117117            buffer_capacity *= 2;
    118118            buffer = (char*)realloc(buffer, buffer_capacity);
  • trunk/JavaScriptCore/ChangeLog

    r34597 r34598  
     12008-06-16  Christian Dywan  <[email protected]>
     2
     3        Reviewed by Sam.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=19557
     6        (JavaScriptCore) minidom uses C++ style comments
     7
     8        Use only C style comments in minidom sources
     9
     10        * API/JSNode.c:
     11        (JSNode_appendChild):
     12        (JSNode_removeChild):
     13        * API/JSNode.h:
     14        * API/JSNodeList.c:
     15        (JSNodeList_getProperty):
     16        * API/JSNodeList.h:
     17        * API/Node.c:
     18        * API/Node.h:
     19        * API/NodeList.c:
     20        (NodeList_new):
     21        (NodeList_item):
     22        * API/NodeList.h:
     23        * API/minidom.c:
     24        (createStringWithContentsOfFile):
     25        * wtf/Assertions.h:
     26        * wtf/UnusedParam.h:
     27
    1282008-06-16  Adriaan de Groot  <[email protected]>
    229
  • trunk/JavaScriptCore/wtf/Assertions.h

    r27947 r34598  
    1 /* -*- mode: c++; c-basic-offset: 4 -*- */
     1/* -*- mode: c; c-basic-offset: 4 -*- */
    22/*
    33 * Copyright (C) 2003, 2006, 2007 Apple Inc.  All rights reserved.
     
    8484#endif
    8585
    86 // WTF logging functions can process %@ in the format string to log a NSObject* but the printf format attribute
    87 // emits a warning when %@ is used in the format string.  Until <rdar://problem/5195437> is resolved we can't include
    88 // the attribute when being used from Objective-C code in case it decides to use %@.
     86/* WTF logging functions can process %@ in the format string to log a NSObject* but the printf format attribute
     87  emits a warning when %@ is used in the format string.  Until <rdar://problem/5195437> is resolved we can't include
     88   the attribute when being used from Objective-C code in case it decides to use %@. */
    8989#if COMPILER(GCC) && !defined(__OBJC__)
    9090#define WTF_ATTRIBUTE_PRINTF(formatStringArgument, extraArguments) __attribute__((__format__(printf, formatStringArgument, extraArguments)))
     
    155155    } \
    156156while (0)
    157 #endif // COMPILER(MSVC7)
     157#endif /* COMPILER(MSVC7) */
    158158#define ASSERT_NOT_REACHED() do { \
    159159    WTFReportAssertionFailure(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, 0); \
     
    230230#endif
    231231
    232 #endif // WTF_Assertions_h
     232#endif /* WTF_Assertions_h */
  • trunk/JavaScriptCore/wtf/UnusedParam.h

    r17127 r34598  
    1 /* -*- mode: c++; c-basic-offset: 4 -*- */
     1/* -*- mode: c; c-basic-offset: 4 -*- */
    22/*
    33 *  Copyright (C) 2006 Apple Computer, Inc.
     
    2828#define UNUSED_PARAM(x) (void)x
    2929
    30 #endif // WTF_UnusedParam_h
     30#endif /* WTF_UnusedParam_h */
Note: See TracChangeset for help on using the changeset viewer.