From 1a4be4dfa06826f638f9068205e2cdd7f4b9cf3d Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Tue, 26 Feb 2013 15:39:12 -0800 Subject: [PATCH 1/3] Add Objective-C++ to languages.yml --- lib/linguist/languages.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 69d3a869..11ee62a8 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -854,8 +854,14 @@ Objective-C: - obj-c - objc primary_extension: .m - extensions: - - .mm + +Objective-C++: + type: programming + color: "#4886FC" + aliases: + - obj-c++ + - objc++ + primary_extension: .mm Objective-J: type: programming From bb348c40388e391466bdce6b414be360e1fd46bb Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Tue, 26 Feb 2013 16:02:59 -0800 Subject: [PATCH 2/3] Add Objective-C++ samples --- samples/Objective-C++/EventHandlerMac.mm | 778 ++++++++++++ samples/Objective-C++/objsql.mm | 1372 ++++++++++++++++++++++ 2 files changed, 2150 insertions(+) create mode 100644 samples/Objective-C++/EventHandlerMac.mm create mode 100644 samples/Objective-C++/objsql.mm diff --git a/samples/Objective-C++/EventHandlerMac.mm b/samples/Objective-C++/EventHandlerMac.mm new file mode 100644 index 00000000..f6028c0b --- /dev/null +++ b/samples/Objective-C++/EventHandlerMac.mm @@ -0,0 +1,778 @@ +// grabbed from https://raw.github.com/AOKP/external_webkit/61b2fb934bdd3a5fea253e2de0bcf8a47a552333/Source/WebCore/page/mac/EventHandlerMac.mm + +/* + * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "EventHandler.h" + +#include "AXObjectCache.h" +#include "BlockExceptions.h" +#include "Chrome.h" +#include "ChromeClient.h" +#include "ClipboardMac.h" +#include "DragController.h" +#include "EventNames.h" +#include "FocusController.h" +#include "Frame.h" +#include "FrameLoader.h" +#include "FrameView.h" +#include "KeyboardEvent.h" +#include "MouseEventWithHitTestResults.h" +#include "NotImplemented.h" +#include "Page.h" +#include "PlatformKeyboardEvent.h" +#include "PlatformWheelEvent.h" +#include "RenderWidget.h" +#include "RuntimeApplicationChecks.h" +#include "Scrollbar.h" +#include "Settings.h" +#include "WebCoreSystemInterface.h" +#include +#include + +#if !(defined(OBJC_API_VERSION) && OBJC_API_VERSION > 0) +static inline IMP method_setImplementation(Method m, IMP i) +{ + IMP oi = m->method_imp; + m->method_imp = i; + return oi; +} +#endif + +namespace WebCore { + +#if ENABLE(DRAG_SUPPORT) +const double EventHandler::TextDragDelay = 0.15; +#endif + +static RetainPtr& currentNSEventSlot() +{ + DEFINE_STATIC_LOCAL(RetainPtr, event, ()); + return event; +} + +NSEvent *EventHandler::currentNSEvent() +{ + return currentNSEventSlot().get(); +} + +class CurrentEventScope { + WTF_MAKE_NONCOPYABLE(CurrentEventScope); +public: + CurrentEventScope(NSEvent *); + ~CurrentEventScope(); + +private: + RetainPtr m_savedCurrentEvent; +#ifndef NDEBUG + RetainPtr m_event; +#endif +}; + +inline CurrentEventScope::CurrentEventScope(NSEvent *event) + : m_savedCurrentEvent(currentNSEventSlot()) +#ifndef NDEBUG + , m_event(event) +#endif +{ + currentNSEventSlot() = event; +} + +inline CurrentEventScope::~CurrentEventScope() +{ + ASSERT(currentNSEventSlot() == m_event); + currentNSEventSlot() = m_savedCurrentEvent; +} + +bool EventHandler::wheelEvent(NSEvent *event) +{ + Page* page = m_frame->page(); + if (!page) + return false; + + CurrentEventScope scope(event); + + PlatformWheelEvent wheelEvent(event, page->chrome()->platformPageClient()); + handleWheelEvent(wheelEvent); + + return wheelEvent.isAccepted(); +} + +PassRefPtr EventHandler::currentKeyboardEvent() const +{ + NSEvent *event = [NSApp currentEvent]; + if (!event) + return 0; + switch ([event type]) { + case NSKeyDown: { + PlatformKeyboardEvent platformEvent(event); + platformEvent.disambiguateKeyDownEvent(PlatformKeyboardEvent::RawKeyDown); + return KeyboardEvent::create(platformEvent, m_frame->document()->defaultView()); + } + case NSKeyUp: + return KeyboardEvent::create(event, m_frame->document()->defaultView()); + default: + return 0; + } +} + +bool EventHandler::keyEvent(NSEvent *event) +{ + BEGIN_BLOCK_OBJC_EXCEPTIONS; + + ASSERT([event type] == NSKeyDown || [event type] == NSKeyUp); + + CurrentEventScope scope(event); + return keyEvent(PlatformKeyboardEvent(event)); + + END_BLOCK_OBJC_EXCEPTIONS; + + return false; +} + +void EventHandler::focusDocumentView() +{ + Page* page = m_frame->page(); + if (!page) + return; + + if (FrameView* frameView = m_frame->view()) { + if (NSView *documentView = frameView->documentView()) + page->chrome()->focusNSView(documentView); + } + + page->focusController()->setFocusedFrame(m_frame); +} + +bool EventHandler::passWidgetMouseDownEventToWidget(const MouseEventWithHitTestResults& event) +{ + // Figure out which view to send the event to. + RenderObject* target = targetNode(event) ? targetNode(event)->renderer() : 0; + if (!target || !target->isWidget()) + return false; + + // Double-click events don't exist in Cocoa. Since passWidgetMouseDownEventToWidget will + // just pass currentEvent down to the widget, we don't want to call it for events that + // don't correspond to Cocoa events. The mousedown/ups will have already been passed on as + // part of the pressed/released handling. + return passMouseDownEventToWidget(toRenderWidget(target)->widget()); +} + +bool EventHandler::passWidgetMouseDownEventToWidget(RenderWidget* renderWidget) +{ + return passMouseDownEventToWidget(renderWidget->widget()); +} + +static bool lastEventIsMouseUp() +{ + // Many AppKit widgets run their own event loops and consume events while the mouse is down. + // When they finish, currentEvent is the mouseUp that they exited on. We need to update + // the WebCore state with this mouseUp, which we never saw. This method lets us detect + // that state. Handling this was critical when we used AppKit widgets for form elements. + // It's not clear in what cases this is helpful now -- it's possible it can be removed. + + BEGIN_BLOCK_OBJC_EXCEPTIONS; + NSEvent *currentEventAfterHandlingMouseDown = [NSApp currentEvent]; + return EventHandler::currentNSEvent() != currentEventAfterHandlingMouseDown + && [currentEventAfterHandlingMouseDown type] == NSLeftMouseUp + && [currentEventAfterHandlingMouseDown timestamp] >= [EventHandler::currentNSEvent() timestamp]; + END_BLOCK_OBJC_EXCEPTIONS; + + return false; +} + +bool EventHandler::passMouseDownEventToWidget(Widget* pWidget) +{ + // FIXME: This function always returns true. It should be changed either to return + // false in some cases or the return value should be removed. + + RefPtr widget = pWidget; + + if (!widget) { + LOG_ERROR("hit a RenderWidget without a corresponding Widget, means a frame is half-constructed"); + return true; + } + + // In WebKit2 we will never have an NSView. Just return early and let the regular event handler machinery take care of + // dispatching the event. + if (!widget->platformWidget()) + return false; + + BEGIN_BLOCK_OBJC_EXCEPTIONS; + + NSView *nodeView = widget->platformWidget(); + ASSERT([nodeView superview]); + NSView *view = [nodeView hitTest:[[nodeView superview] convertPoint:[currentNSEvent() locationInWindow] fromView:nil]]; + if (!view) { + // We probably hit the border of a RenderWidget + return true; + } + + Page* page = m_frame->page(); + if (!page) + return true; + + if (page->chrome()->client()->firstResponder() != view) { + // Normally [NSWindow sendEvent:] handles setting the first responder. + // But in our case, the event was sent to the view representing the entire web page. + if ([currentNSEvent() clickCount] <= 1 && [view acceptsFirstResponder] && [view needsPanelToBecomeKey]) + page->chrome()->client()->makeFirstResponder(view); + } + + // We need to "defer loading" while tracking the mouse, because tearing down the + // page while an AppKit control is tracking the mouse can cause a crash. + + // FIXME: In theory, WebCore now tolerates tear-down while tracking the + // mouse. We should confirm that, and then remove the deferrsLoading + // hack entirely. + + bool wasDeferringLoading = page->defersLoading(); + if (!wasDeferringLoading) + page->setDefersLoading(true); + + ASSERT(!m_sendingEventToSubview); + m_sendingEventToSubview = true; + NSView *outerView = widget->getOuterView(); + widget->beforeMouseDown(outerView, widget.get()); + [view mouseDown:currentNSEvent()]; + widget->afterMouseDown(outerView, widget.get()); + m_sendingEventToSubview = false; + + if (!wasDeferringLoading) + page->setDefersLoading(false); + + // Remember which view we sent the event to, so we can direct the release event properly. + m_mouseDownView = view; + m_mouseDownWasInSubframe = false; + + // Many AppKit widgets run their own event loops and consume events while the mouse is down. + // When they finish, currentEvent is the mouseUp that they exited on. We need to update + // the EventHandler state with this mouseUp, which we never saw. + // If this event isn't a mouseUp, we assume that the mouseUp will be coming later. There + // is a hole here if the widget consumes both the mouseUp and subsequent events. + if (lastEventIsMouseUp()) + m_mousePressed = false; + + END_BLOCK_OBJC_EXCEPTIONS; + + return true; +} + +// Note that this does the same kind of check as [target isDescendantOf:superview]. +// There are two differences: This is a lot slower because it has to walk the whole +// tree, and this works in cases where the target has already been deallocated. +static bool findViewInSubviews(NSView *superview, NSView *target) +{ + BEGIN_BLOCK_OBJC_EXCEPTIONS; + NSEnumerator *e = [[superview subviews] objectEnumerator]; + NSView *subview; + while ((subview = [e nextObject])) { + if (subview == target || findViewInSubviews(subview, target)) { + return true; + } + } + END_BLOCK_OBJC_EXCEPTIONS; + + return false; +} + +NSView *EventHandler::mouseDownViewIfStillGood() +{ + // Since we have no way of tracking the lifetime of m_mouseDownView, we have to assume that + // it could be deallocated already. We search for it in our subview tree; if we don't find + // it, we set it to nil. + NSView *mouseDownView = m_mouseDownView; + if (!mouseDownView) { + return nil; + } + FrameView* topFrameView = m_frame->view(); + NSView *topView = topFrameView ? topFrameView->platformWidget() : nil; + if (!topView || !findViewInSubviews(topView, mouseDownView)) { + m_mouseDownView = nil; + return nil; + } + return mouseDownView; +} + +#if ENABLE(DRAG_SUPPORT) +bool EventHandler::eventLoopHandleMouseDragged(const MouseEventWithHitTestResults&) +{ + NSView *view = mouseDownViewIfStillGood(); + + if (!view) + return false; + + if (!m_mouseDownWasInSubframe) { + ASSERT(!m_sendingEventToSubview); + m_sendingEventToSubview = true; + BEGIN_BLOCK_OBJC_EXCEPTIONS; + [view mouseDragged:currentNSEvent()]; + END_BLOCK_OBJC_EXCEPTIONS; + m_sendingEventToSubview = false; + } + + return true; +} +#endif // ENABLE(DRAG_SUPPORT) + +bool EventHandler::eventLoopHandleMouseUp(const MouseEventWithHitTestResults&) +{ + NSView *view = mouseDownViewIfStillGood(); + if (!view) + return false; + + if (!m_mouseDownWasInSubframe) { + ASSERT(!m_sendingEventToSubview); + m_sendingEventToSubview = true; + BEGIN_BLOCK_OBJC_EXCEPTIONS; + [view mouseUp:currentNSEvent()]; + END_BLOCK_OBJC_EXCEPTIONS; + m_sendingEventToSubview = false; + } + + return true; +} + +bool EventHandler::passSubframeEventToSubframe(MouseEventWithHitTestResults& event, Frame* subframe, HitTestResult* hoveredNode) +{ + BEGIN_BLOCK_OBJC_EXCEPTIONS; + + switch ([currentNSEvent() type]) { + case NSLeftMouseDragged: + case NSOtherMouseDragged: + case NSRightMouseDragged: + // This check is bogus and results in , but removing it breaks a number of + // layout tests. + if (!m_mouseDownWasInSubframe) + return false; +#if ENABLE(DRAG_SUPPORT) + if (subframe->page()->dragController()->didInitiateDrag()) + return false; +#endif + case NSMouseMoved: + // Since we're passing in currentNSEvent() here, we can call + // handleMouseMoveEvent() directly, since the save/restore of + // currentNSEvent() that mouseMoved() does would have no effect. + ASSERT(!m_sendingEventToSubview); + m_sendingEventToSubview = true; + subframe->eventHandler()->handleMouseMoveEvent(currentPlatformMouseEvent(), hoveredNode); + m_sendingEventToSubview = false; + return true; + + case NSLeftMouseDown: { + Node* node = targetNode(event); + if (!node) + return false; + RenderObject* renderer = node->renderer(); + if (!renderer || !renderer->isWidget()) + return false; + Widget* widget = toRenderWidget(renderer)->widget(); + if (!widget || !widget->isFrameView()) + return false; + if (!passWidgetMouseDownEventToWidget(toRenderWidget(renderer))) + return false; + m_mouseDownWasInSubframe = true; + return true; + } + case NSLeftMouseUp: { + if (!m_mouseDownWasInSubframe) + return false; + ASSERT(!m_sendingEventToSubview); + m_sendingEventToSubview = true; + subframe->eventHandler()->handleMouseReleaseEvent(currentPlatformMouseEvent()); + m_sendingEventToSubview = false; + return true; + } + default: + return false; + } + END_BLOCK_OBJC_EXCEPTIONS; + + return false; +} + +static IMP originalNSScrollViewScrollWheel; +static bool _nsScrollViewScrollWheelShouldRetainSelf; +static void selfRetainingNSScrollViewScrollWheel(NSScrollView *, SEL, NSEvent *); + +static bool nsScrollViewScrollWheelShouldRetainSelf() +{ + ASSERT(isMainThread()); + + return _nsScrollViewScrollWheelShouldRetainSelf; +} + +static void setNSScrollViewScrollWheelShouldRetainSelf(bool shouldRetain) +{ + ASSERT(isMainThread()); + + if (!originalNSScrollViewScrollWheel) { + Method method = class_getInstanceMethod(objc_getRequiredClass("NSScrollView"), @selector(scrollWheel:)); + originalNSScrollViewScrollWheel = method_setImplementation(method, reinterpret_cast(selfRetainingNSScrollViewScrollWheel)); + } + + _nsScrollViewScrollWheelShouldRetainSelf = shouldRetain; +} + +static void selfRetainingNSScrollViewScrollWheel(NSScrollView *self, SEL selector, NSEvent *event) +{ + bool shouldRetainSelf = isMainThread() && nsScrollViewScrollWheelShouldRetainSelf(); + + if (shouldRetainSelf) + [self retain]; + originalNSScrollViewScrollWheel(self, selector, event); + if (shouldRetainSelf) + [self release]; +} + +bool EventHandler::passWheelEventToWidget(PlatformWheelEvent& wheelEvent, Widget* widget) +{ + BEGIN_BLOCK_OBJC_EXCEPTIONS; + + if (!widget) + return false; + + NSView* nodeView = widget->platformWidget(); + if (!nodeView) { + // WebKit2 code path. + if (!widget->isFrameView()) + return false; + + return static_cast(widget)->frame()->eventHandler()->handleWheelEvent(wheelEvent); + } + + if ([currentNSEvent() type] != NSScrollWheel || m_sendingEventToSubview) + return false; + + ASSERT(nodeView); + ASSERT([nodeView superview]); + NSView *view = [nodeView hitTest:[[nodeView superview] convertPoint:[currentNSEvent() locationInWindow] fromView:nil]]; + if (!view) + // We probably hit the border of a RenderWidget + return false; + + ASSERT(!m_sendingEventToSubview); + m_sendingEventToSubview = true; + // Work around which can cause -[NSScrollView scrollWheel:] to + // crash if the NSScrollView is released during timer or network callback dispatch + // in the nested tracking runloop that -[NSScrollView scrollWheel:] runs. + setNSScrollViewScrollWheelShouldRetainSelf(true); + [view scrollWheel:currentNSEvent()]; + setNSScrollViewScrollWheelShouldRetainSelf(false); + m_sendingEventToSubview = false; + return true; + + END_BLOCK_OBJC_EXCEPTIONS; + return false; +} + +void EventHandler::mouseDown(NSEvent *event) +{ + FrameView* v = m_frame->view(); + if (!v || m_sendingEventToSubview) + return; + + BEGIN_BLOCK_OBJC_EXCEPTIONS; + + m_frame->loader()->resetMultipleFormSubmissionProtection(); + + m_mouseDownView = nil; + + CurrentEventScope scope(event); + + handleMousePressEvent(currentPlatformMouseEvent()); + + END_BLOCK_OBJC_EXCEPTIONS; +} + +void EventHandler::mouseDragged(NSEvent *event) +{ + FrameView* v = m_frame->view(); + if (!v || m_sendingEventToSubview) + return; + + BEGIN_BLOCK_OBJC_EXCEPTIONS; + + CurrentEventScope scope(event); + handleMouseMoveEvent(currentPlatformMouseEvent()); + + END_BLOCK_OBJC_EXCEPTIONS; +} + +void EventHandler::mouseUp(NSEvent *event) +{ + FrameView* v = m_frame->view(); + if (!v || m_sendingEventToSubview) + return; + + BEGIN_BLOCK_OBJC_EXCEPTIONS; + + CurrentEventScope scope(event); + + // Our behavior here is a little different that Qt. Qt always sends + // a mouse release event, even for a double click. To correct problems + // in khtml's DOM click event handling we do not send a release here + // for a double click. Instead we send that event from FrameView's + // handleMouseDoubleClickEvent. Note also that the third click of + // a triple click is treated as a single click, but the fourth is then + // treated as another double click. Hence the "% 2" below. + int clickCount = [event clickCount]; + if (clickCount > 0 && clickCount % 2 == 0) + handleMouseDoubleClickEvent(currentPlatformMouseEvent()); + else + handleMouseReleaseEvent(currentPlatformMouseEvent()); + + m_mouseDownView = nil; + + END_BLOCK_OBJC_EXCEPTIONS; +} + +/* + A hack for the benefit of AK's PopUpButton, which uses the Carbon menu manager, which thus + eats all subsequent events after it is starts its modal tracking loop. After the interaction + is done, this routine is used to fix things up. When a mouse down started us tracking in + the widget, we post a fake mouse up to balance the mouse down we started with. When a + key down started us tracking in the widget, we post a fake key up to balance things out. + In addition, we post a fake mouseMoved to get the cursor in sync with whatever we happen to + be over after the tracking is done. + */ +void EventHandler::sendFakeEventsAfterWidgetTracking(NSEvent *initiatingEvent) +{ + FrameView* view = m_frame->view(); + if (!view) + return; + + BEGIN_BLOCK_OBJC_EXCEPTIONS; + + m_sendingEventToSubview = false; + int eventType = [initiatingEvent type]; + if (eventType == NSLeftMouseDown || eventType == NSKeyDown) { + NSEvent *fakeEvent = nil; + if (eventType == NSLeftMouseDown) { + fakeEvent = [NSEvent mouseEventWithType:NSLeftMouseUp + location:[initiatingEvent locationInWindow] + modifierFlags:[initiatingEvent modifierFlags] + timestamp:[initiatingEvent timestamp] + windowNumber:[initiatingEvent windowNumber] + context:[initiatingEvent context] + eventNumber:[initiatingEvent eventNumber] + clickCount:[initiatingEvent clickCount] + pressure:[initiatingEvent pressure]]; + + [NSApp postEvent:fakeEvent atStart:YES]; + } else { // eventType == NSKeyDown + fakeEvent = [NSEvent keyEventWithType:NSKeyUp + location:[initiatingEvent locationInWindow] + modifierFlags:[initiatingEvent modifierFlags] + timestamp:[initiatingEvent timestamp] + windowNumber:[initiatingEvent windowNumber] + context:[initiatingEvent context] + characters:[initiatingEvent characters] + charactersIgnoringModifiers:[initiatingEvent charactersIgnoringModifiers] + isARepeat:[initiatingEvent isARepeat] + keyCode:[initiatingEvent keyCode]]; + [NSApp postEvent:fakeEvent atStart:YES]; + } + // FIXME: We should really get the current modifierFlags here, but there's no way to poll + // them in Cocoa, and because the event stream was stolen by the Carbon menu code we have + // no up-to-date cache of them anywhere. + fakeEvent = [NSEvent mouseEventWithType:NSMouseMoved + location:[[view->platformWidget() window] convertScreenToBase:[NSEvent mouseLocation]] + modifierFlags:[initiatingEvent modifierFlags] + timestamp:[initiatingEvent timestamp] + windowNumber:[initiatingEvent windowNumber] + context:[initiatingEvent context] + eventNumber:0 + clickCount:0 + pressure:0]; + [NSApp postEvent:fakeEvent atStart:YES]; + } + + END_BLOCK_OBJC_EXCEPTIONS; +} + +void EventHandler::mouseMoved(NSEvent *event) +{ + // Reject a mouse moved if the button is down - screws up tracking during autoscroll + // These happen because WebKit sometimes has to fake up moved events. + if (!m_frame->view() || m_mousePressed || m_sendingEventToSubview) + return; + + BEGIN_BLOCK_OBJC_EXCEPTIONS; + CurrentEventScope scope(event); + mouseMoved(currentPlatformMouseEvent()); + END_BLOCK_OBJC_EXCEPTIONS; +} + +static bool frameHasPlatformWidget(Frame* frame) +{ + if (FrameView* frameView = frame->view()) { + if (frameView->platformWidget()) + return true; + } + + return false; +} + +bool EventHandler::passMousePressEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe) +{ + // WebKit1 code path. + if (frameHasPlatformWidget(m_frame)) + return passSubframeEventToSubframe(mev, subframe); + + // WebKit2 code path. + subframe->eventHandler()->handleMousePressEvent(mev.event()); + return true; +} + +bool EventHandler::passMouseMoveEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe, HitTestResult* hoveredNode) +{ + // WebKit1 code path. + if (frameHasPlatformWidget(m_frame)) + return passSubframeEventToSubframe(mev, subframe, hoveredNode); + + // WebKit2 code path. + if (m_mouseDownMayStartDrag && !m_mouseDownWasInSubframe) + return false; + subframe->eventHandler()->handleMouseMoveEvent(mev.event(), hoveredNode); + return true; +} + +bool EventHandler::passMouseReleaseEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe) +{ + // WebKit1 code path. + if (frameHasPlatformWidget(m_frame)) + return passSubframeEventToSubframe(mev, subframe); + + // WebKit2 code path. + subframe->eventHandler()->handleMouseReleaseEvent(mev.event()); + return true; +} + +PlatformMouseEvent EventHandler::currentPlatformMouseEvent() const +{ + NSView *windowView = nil; + if (Page* page = m_frame->page()) + windowView = page->chrome()->platformPageClient(); + return PlatformMouseEvent(currentNSEvent(), windowView); +} + +#if ENABLE(CONTEXT_MENUS) +bool EventHandler::sendContextMenuEvent(NSEvent *event) +{ + Page* page = m_frame->page(); + if (!page) + return false; + return sendContextMenuEvent(PlatformMouseEvent(event, page->chrome()->platformPageClient())); +} +#endif // ENABLE(CONTEXT_MENUS) + +#if ENABLE(DRAG_SUPPORT) +bool EventHandler::eventMayStartDrag(NSEvent *event) +{ + Page* page = m_frame->page(); + if (!page) + return false; + return eventMayStartDrag(PlatformMouseEvent(event, page->chrome()->platformPageClient())); +} +#endif // ENABLE(DRAG_SUPPORT) + +bool EventHandler::eventActivatedView(const PlatformMouseEvent& event) const +{ + return m_activationEventNumber == event.eventNumber(); +} + +#if ENABLE(DRAG_SUPPORT) + +PassRefPtr EventHandler::createDraggingClipboard() const +{ + NSPasteboard *pasteboard = [NSPasteboard pasteboardWithName:NSDragPboard]; + // Must be done before ondragstart adds types and data to the pboard, + // also done for security, as it erases data from the last drag + [pasteboard declareTypes:[NSArray array] owner:nil]; + return ClipboardMac::create(Clipboard::DragAndDrop, pasteboard, ClipboardWritable, m_frame); +} + +#endif + +bool EventHandler::tabsToAllFormControls(KeyboardEvent* event) const +{ + Page* page = m_frame->page(); + if (!page) + return false; + + KeyboardUIMode keyboardUIMode = page->chrome()->client()->keyboardUIMode(); + bool handlingOptionTab = isKeyboardOptionTab(event); + + // If tab-to-links is off, option-tab always highlights all controls + if ((keyboardUIMode & KeyboardAccessTabsToLinks) == 0 && handlingOptionTab) + return true; + + // If system preferences say to include all controls, we always include all controls + if (keyboardUIMode & KeyboardAccessFull) + return true; + + // Otherwise tab-to-links includes all controls, unless the sense is flipped via option-tab. + if (keyboardUIMode & KeyboardAccessTabsToLinks) + return !handlingOptionTab; + + return handlingOptionTab; +} + +bool EventHandler::needsKeyboardEventDisambiguationQuirks() const +{ + Document* document = m_frame->document(); + + // RSS view needs arrow key keypress events. + if (applicationIsSafari() && (document->url().protocolIs("feed") || document->url().protocolIs("feeds"))) + return true; + Settings* settings = m_frame->settings(); + if (!settings) + return false; + +#if ENABLE(DASHBOARD_SUPPORT) + if (settings->usesDashboardBackwardCompatibilityMode()) + return true; +#endif + + if (settings->needsKeyboardEventDisambiguationQuirks()) + return true; + + return false; +} + +unsigned EventHandler::accessKeyModifiers() +{ + // Control+Option key combinations are usually unused on Mac OS X, but not when VoiceOver is enabled. + // So, we use Control in this case, even though it conflicts with Emacs-style key bindings. + // See for more detail. + if (AXObjectCache::accessibilityEnhancedUserInterfaceEnabled()) + return PlatformKeyboardEvent::CtrlKey; + + return PlatformKeyboardEvent::CtrlKey | PlatformKeyboardEvent::AltKey; +} + +} diff --git a/samples/Objective-C++/objsql.mm b/samples/Objective-C++/objsql.mm new file mode 100644 index 00000000..f71ca8eb --- /dev/null +++ b/samples/Objective-C++/objsql.mm @@ -0,0 +1,1372 @@ +/* + * objsql.m - implementaion simple persistence layer using objcpp.h + * ======== + * + * Created by John Holdsworth on 01/04/2009. + * Copyright 2009 John Holdsworth. + * + * $Id: //depot/4.4/ObjCpp/objsql.mm#11 $ + * $DateTime: 2012/09/05 00:20:47 $ + * + * C++ classes to wrap up XCode classes for operator overload of + * useful operations such as access to NSArrays and NSDictionary + * by subscript or NSString operators such as + for concatenation. + * + * This works as the Apple Objective-C compiler supports source + * which mixes C++ with objective C. To enable this: for each + * source file which will include/import this header file, select + * it in Xcode and open it's "Info". To enable mixed compilation, + * for the file's "File Type" select: "sourcecode.cpp.objcpp". + * + * For bugs or ommisions please email objcpp@johnholdsworth.com + * + * Home page for updates and docs: http://objcpp.johnholdsworth.com + * + * You may make commercial use of this source in applications without + * charge but not sell it as source nor can you remove this notice from + * this source if you redistribute. You can make any changes you like + * to this code before redistribution but please annotate them below. + * + * If you find it useful please send a donation via paypal to account + * objcpp@johnholdsworth.com. Thanks. + * + * THIS CODE IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND EITHER + * EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING + * WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS + * THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING + * ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT + * OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED + * TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED + * BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH + * ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + * + */ + +#import +#import + +#import "objsql.h" + +#if 0 +#ifdef OODEBUG +#define OODEBUG_SQL 1 +#endif +#endif + +OOOODatabase OODB; + +static NSString *kOOObject = @"__OOOBJECT__", *kOOInsert = @"__ISINSERT__", *kOOUpdate = @"__ISUPDATE__", *kOOExecSQL = @"__OOEXEC__"; + +#pragma mark OORecord abstract superclass for records + +@implementation OORecord + ++ (id)record OO_AUTORETURNS { + return OO_AUTORELEASE( [[self alloc] init] ); +} + ++ (id)insert OO_AUTORETURNS { + OORecord *record = [self record]; + [record insert]; + return record; +} + ++ (id)insertWithParent:(id)parent { + return [[OODatabase sharedInstance] copyJoinKeysFrom:parent to:[self insert]]; +} + +- (id)insert { [[OODatabase sharedInstance] insert:self]; return self; } +- (id)delete { [[OODatabase sharedInstance] delete:self]; return self; } + +- (void)update { [[OODatabase sharedInstance] update:self]; } +- (void)indate { [[OODatabase sharedInstance] indate:self]; } +- (void)upsert { [[OODatabase sharedInstance] upsert:self]; } + +- (int)commit { return [[OODatabase sharedInstance] commit]; } +- (int)rollback { return [[OODatabase sharedInstance] rollback]; } + +// to handle null values for ints, floats etc. +- (void)setNilValueForKey:(NSString *)key { + static OOReference zeroForNull; + if ( !zeroForNull ) + zeroForNull = [NSNumber numberWithInt:0]; + [self setValue:zeroForNull forKey:key]; +} + ++ (OOArray)select { + return [[OODatabase sharedInstance] select:nil intoClass:self joinFrom:nil]; +} + ++ (OOArray)select:(cOOString)sql { + return [[OODatabase sharedInstance] select:sql intoClass:self joinFrom:nil]; +} + ++ (OOArray)selectRecordsRelatedTo:(id)parent { + return [[OODatabase sharedInstance] select:nil intoClass:self joinFrom:parent]; +} + +- (OOArray)select { + return [[OODatabase sharedInstance] select:nil intoClass:[self class] joinFrom:self]; +} + +/** + import a flat file with column values separated by the delimiter specified into + the table associated with this class. + */ + ++ (int)importFrom:(OOFile &)file delimiter:(cOOString)delim { + OOArray rows = [OOMetaData import:file.string() intoClass:self delimiter:delim]; + [[OODatabase sharedInstance] insertArray:rows]; + return [OODatabase commit]; +} + +/** + Export a flat file with all rows in the table associated with the record subclass. + */ + ++ (BOOL)exportTo:(OOFile &)file delimiter:(cOOString)delim { + return file.save( [OOMetaData export:[self select] delimiter:delim] ); +} + +/** + populate a view with the string values taken from the ivars of the record + */ + +- (void)bindToView:(OOView *)view delegate:(id)delegate { + [OOMetaData bindRecord:self toView:view delegate:delegate]; +} + +/** + When the delegate method os sent use this method to update the record's values + */ + +- (void)updateFromView:(OOView *)view { + [OOMetaData updateRecord:self fromView:view]; +} + +/** + Default description is dictionary containing values of all ivars + */ + +- (NSString *)description { + OOMetaData *metaData = [OOMetaData metaDataForClass:[self class]]; + // hack required where record contains a field "description" to avoid recursion + OOStringArray ivars; ivars <<= *metaData->ivars; ivars -= "description"; + return [*[metaData encode:[self dictionaryWithValuesForKeys:ivars]] description]; +} + +@end + +#pragma mark OOAdaptor - all methods required by objsql to access a database + +/** + An internal class representing the interface to a particular database, in this case sqlite3. + */ + +@interface OOAdaptor : NSObject { + sqlite3 *db; + sqlite3_stmt *stmt; + struct _str_link { + struct _str_link *next; char str[1]; + } *strs; + OO_UNSAFE OODatabase *owner; +} + +- initPath:(cOOString)path database:(OODatabase *)database; +- (BOOL)prepare:(cOOString)sql; + +- (BOOL)bindCols:(cOOStringArray)columns values:(cOOValueDictionary)values startingAt:(int)pno bindNulls:(BOOL)bindNulls; +- (OOArray)bindResultsIntoInstancesOfClass:(Class)recordClass metaData:(OOMetaData *)metaData; +- (sqlite_int64)lastInsertRowID; + +@end + +@interface NSData(OOExtras) +- initWithDescription:(NSString *)description; +@end + +#pragma mark OODatabase is the low level interface to a particular database + +@implementation OODatabase + +static OOReference sharedInstance; + +/** + By default database file is "objsql.db" in the user/application's "Documents" directory + and a single shared OODatabase instance used for all db operations. + */ + ++ (OODatabase *)sharedInstance { + if ( !sharedInstance ) + [self sharedInstanceForPath:OODocument("objsql.db").path()]; + return sharedInstance; +} + +/** + Shared instance can be switched between any file paths. + */ + + + (OODatabase *)sharedInstanceForPath:(cOOString)path { + if ( !!sharedInstance ) + sharedInstance = OONil; + if ( !!path ) + OO_RELEASE( sharedInstance = [[OODatabase alloc] initPath:path] ); + return sharedInstance; +} + ++ (BOOL)exec:(cOOString)fmt, ... { + va_list argp; va_start(argp, fmt); + NSString *sql = [[NSString alloc] initWithFormat:fmt arguments:argp]; + va_end( argp ); + return [[self sharedInstance] exec:OO_AUTORELEASE( sql )]; +} + ++ (OOArray)select:(cOOString)select intoClass:(Class)recordClass joinFrom:(id)parent { + return [[self sharedInstance] select:select intoClass:recordClass joinFrom:parent]; +} ++ (OOArray)select:(cOOString)select intoClass:(Class)recordClass { + return [[self sharedInstance] select:select intoClass:recordClass joinFrom:nil]; +} ++ (OOArray)select:(cOOString)select { + return [[self sharedInstance] select:select intoClass:nil joinFrom:nil]; +} + ++ (int)insertArray:(const OOArray &)objects { return [[self sharedInstance] insertArray:objects]; } ++ (int)deleteArray:(const OOArray &)objects { return [[self sharedInstance] deleteArray:objects]; } + ++ (int)insert:(id)object { return [[self sharedInstance] insert:object]; } ++ (int)delete:(id)object { return [[self sharedInstance] delete:object]; } ++ (int)update:(id)object { return [[self sharedInstance] update:object]; } + ++ (int)indate:(id)object { return [[self sharedInstance] indate:object]; } ++ (int)upsert:(id)object { return [[self sharedInstance] upsert:object]; } + ++ (int)commit { return [[self sharedInstance] commit]; } ++ (int)rollback { return [[self sharedInstance] rollback]; } ++ (int)commitTransaction { return [[OODatabase sharedInstance] commitTransaction]; } + +/** + Designated initialiser for OODatabase instances. Generally only the shared instance is used + and the OODatabase class object is messaged instead. + */ + +- initPath:(cOOString)path { + if ( self = [super init] ) + OO_RELEASE( adaptor = [[OOAdaptor alloc] initPath:path database:self] ); + return self; +} + +/** + Automatically register all classes which are subclasses of a record abstract superclass (e.g. OORecord). + */ + +- (OOStringArray)registerSubclassesOf:(Class)recordSuperClass { + int numClasses = objc_getClassList( NULL, 0 ); + Class *classes = (Class *)malloc( sizeof *classes * numClasses ); + OOArray viewClasses; + OOStringArray classNames; + + // scan all registered classes for relevant subclasses + numClasses = objc_getClassList( classes, numClasses ); + for ( int c=0 ; cresults. + */ + +- (BOOL)exec:(cOOString)fmt, ... { + va_list argp; va_start(argp, fmt); + NSString *sql = [[NSString alloc] initWithFormat:fmt arguments:argp]; + va_end( argp ); + results = [self select:sql intoClass:NULL joinFrom:nil]; + OO_RELEASE( sql ); + return !errcode; +} + +/** + Return a single value from row 1, column one from sql sent to the database as a string. + */ + +- (OOString)stringForSql:(cOOString)fmt, ... { + va_list argp; va_start(argp, fmt); + NSString *sql = OO_AUTORELEASE( [[NSString alloc] initWithFormat:fmt arguments:argp] ); + va_end( argp ); + if( [self exec:"%@", sql] && results > 0 ) { + NSString *aColumnName = [[**results[0] allKeys] objectAtIndex:0]; + return [(NSNumber *)(*results[0])[aColumnName] stringValue]; + } + else + return nil; +} + +/** + Used to initialise new child records automatically from parent in relation. + */ + +- (id)copyJoinKeysFrom:(id)parent to:(id)newChild { + OOMetaData *parentMetaData = [self tableMetaDataForClass:[parent class]], + *childMetaData = [self tableMetaDataForClass:[newChild class]]; + OOStringArray commonColumns = [parentMetaData naturalJoinTo:childMetaData->columns]; //// + OOValueDictionary keyValues = [parentMetaData encode:[parent dictionaryWithValuesForKeys:commonColumns]]; + [newChild setValuesForKeysWithDictionary:[childMetaData decode:keyValues]]; + return newChild; +} + +/** + Build a where clause for the columns specified. + */ + +- (OOString)whereClauseFor:(cOOStringArray)columns values:(cOOValueDictionary)values qualifyNulls:(BOOL)qualifyNulls { + OOString out; + for ( int i=0 ; ijoinableColumns]; + joinValues = [parentMetaData encode:[parent dictionaryWithValuesForKeys:sharedColumns]]; + + sql += [self whereClauseFor:sharedColumns values:joinValues qualifyNulls:NO]; + } + + if ( [metaData->recordClass respondsToSelector:@selector(ooOrderBy)] ) + sql += OOFormat( @"\norder by %@", [metaData->recordClass ooOrderBy] ); + +#ifdef OODEBUG_SQL + NSLog( @"-[OOMetaData prepareSql:] %@\n%@", *sql, *joinValues ); +#endif + + if ( ![*adaptor prepare:sql] ) + return NO; + + return !parent || [*adaptor bindCols:sharedColumns values:joinValues startingAt:1 bindNulls:NO]; +} + +/** + Determine a list of the tables which have a natural join to the record passed in. + If the record is a specific instance of from a table this should determine if + there are any record which exist using the join. + */ + +- (OOArray)tablesRelatedByNaturalJoinFrom:(id)record { + OOMetaData *metaData = [record class] == [OOMetaData class] ? + record : [self tableMetaDataForClass:[record class]]; + + OOStringArray tablesWithNaturalJoin; + tablesWithNaturalJoin <<= metaData->tablesWithNaturalJoin; + + if ( record && record != metaData ) + for ( int i=0 ; i > tmpResults = [*adaptor bindResultsIntoInstancesOfClass:NULL metaData:nil]; + + if ( ![(*tmpResults[0])["result"] intValue] ) + ~tablesWithNaturalJoin[i--]; + } + + return tableMetaDataByClassName[+tablesWithNaturalJoin]; +} + +/** + Perform a select from a table on the database using either the sql specified + orselect all columns from the table associated with the record class passed in. + If a parent is passed in make a natural join from that record. + */ + +- (OOArray)select:(cOOString)select intoClass:(Class)recordClass joinFrom:(id)parent { + OOMetaData *metaData = [self tableMetaDataForClass:recordClass ? recordClass : [parent class]]; + OOString sql = !select ? + OOFormat( @"select %@\nfrom %@", *(metaData->outcols/", "), *metaData->tableName ) : *select; + + if ( ![self prepareSql:sql joinFrom:parent toTable:metaData] ) + return nil; + + return [*adaptor bindResultsIntoInstancesOfClass:recordClass metaData:metaData]; +} + +- (OOArray)select:(cOOString)select intoClass:(Class)recordClass { + return [self select:select intoClass:recordClass joinFrom:nil]; +} + +- (OOArray)select:(cOOString)select { + return [self select:select intoClass:nil joinFrom:nil]; +} + +/** + Returns sqlite3 row identifier for a record instance. + */ + +- (long long)rowIDForRecord:(id)record { + OOMetaData *metaData = [self tableMetaDataForClass:[record class]]; + OOString sql = OOFormat( @"select ROWID from %@", *metaData->tableName ); + OOArray > idResults = [self select:sql intoClass:nil joinFrom:record]; + return [*(*idResults[0])[@"rowid"] longLongValue]; +} + +/** + Returns sqlite3 row identifier for last inserted record. + */ + +- (long long)lastInsertRowID { + return [*adaptor lastInsertRowID]; +} + +/** + Insert an array of record objects into the database. This needs to be commited to take effect. + */ + +- (int)insertArray:(const OOArray &)objects { + int count = 0; + for ( id object in *objects ) + count = [self insert:object]; + return count; +} + +/** + Delete an array of record objects from the database. This needs to be commited to take effect. + */ + +- (int)deleteArray:(const OOArray &)objects { + int count = 0; + for ( id object in *objects ) + if ( ![object respondsToSelector:@selector(delete)] ) + count = [self delete:object]; + else { + [object delete]; + count++; + } + return count; +} + +/** + Insert the values of the record class instance at the time this method was called into the db. + (must be commited to take effect). Returns the total number of outstanding inserts/updates/deletes. + */ + +- (int)insert:(id)record { + return transaction += OOValueDictionary( kOOObject, record, kOOInsert, kCFNull, nil ); +} + +/** + Use the values of the record instance at the time this method is called in a where clause to + delete from the database when commit is called. Returns the total number of outstanding + inserts/updates/deletes. + */ + +- (int)delete:(id)record { + return transaction += OOValueDictionary( kOOObject, record, nil ); +} + +/** + Call this method if you intend to make changes to the record object and save them to the database. + This takes a snapshot of the previous values to use as a key for the update operation when "commit" + is called. Returns the total number of outstanding inserts/updates/deletes. + */ + +- (int)update:(id)record { + OOMetaData *metaData = [self tableMetaDataForClass:[record class]]; + OOValueDictionary oldValues = [metaData encode:[record dictionaryWithValuesForKeys:metaData->columns]]; + for ( NSString *key in *metaData->tocopy ) + OO_RELEASE( oldValues[key] = [oldValues[key] copy] ); + oldValues[kOOUpdate] = OONull; + oldValues[kOOObject] = record; + return transaction += oldValues; +} + +/** + Inserts a record into the database the deletes any previous record with the same key. + This ensures the record's rowid changes if this is used by child records. + */ + +- (int)indate:(id)record { + OOMetaData *metaData = [self tableMetaDataForClass:[record class]]; + OOString sql = OOFormat( @"select rowid from %@", *metaData->tableName ); + OOArray existing = [self select:sql intoClass:nil joinFrom:record]; + int count = [self insert:record]; + for ( NSDictionary *exist in *existing ) { + OOString sql = OOFormat( @"delete from %@ where rowid = %ld", *metaData->tableName, + (long)[[exist objectForKey:@"rowid"] longLongValue] ); + transaction += OOValueDictionary( kOOExecSQL, *sql, nil ); + } + return count; +} + +/** + Inserts a record into the database unless another record with the same key column values + exists in which case it will do an update of the previous record (preserving the ROWID.) + */ + +- (int)upsert:(id)record { + OOArray existing = [self select:nil intoClass:[record class] joinFrom:record]; + if ( existing > 1 ) + OOWarn( @"-[ODatabase upsert:] Duplicate record for upsert: %@", record ); + if ( existing > 0 ) { + [self update:existing[0]]; + (*transaction[-1])[kOOObject] = record; + return transaction; + } + else + return [self insert:record]; +} + +/** + Commit all pending inserts, updates and deletes to the database. Use commitTransaction to perform + this inside a database transaction. + */ + +- (int)commit { + int commited = 0; + + for ( int i=0 ; i object = *values[kOOObject]; values -= kOOObject; + BOOL isInsert = !!~values[kOOInsert], isUpdate = !!~values[kOOUpdate]; + + OOMetaData *metaData = [self tableMetaDataForClass:[object class]]; + OOValueDictionary newValues = [metaData encode:[object dictionaryWithValuesForKeys:metaData->columns]]; + OOStringArray changedCols; + + if ( isUpdate ) { + for ( NSString *name in *metaData->columns ) + if ( ![*newValues[name] isEqual:values[name]] ) + changedCols += name; + } + else + values = newValues; + + OOString sql = isInsert ? + OOFormat( @"insert into %@ (%@) values (", *metaData->tableName, *(metaData->columns/", ") ) : + OOFormat( isUpdate ? @"update %@ set" : @"delete from %@", *metaData->tableName ); + + int nchanged = changedCols; + if ( isUpdate && nchanged == 0 ) { + OOWarn( @"%s %@ (%@)", errmsg = (char *)"-[ODatabase commit:] Update of unchanged record", *object, *(lastSQL = sql) ); + continue; + } + + for ( int i=0 ; icolumns ; i++ ) + sql += i==0 ? quote : commaQuote; + sql += ")"; + } + else + sql += [self whereClauseFor:metaData->columns values:values qualifyNulls:YES]; + +#ifdef OODEBUG_SQL + NSLog( @"-[OODatabase commit]: %@ %@", *sql, *values ); +#endif + + if ( ![*adaptor prepare:sql] ) + continue; + + if ( isUpdate ) + [*adaptor bindCols:changedCols values:newValues startingAt:1 bindNulls:YES]; + [*adaptor bindCols:metaData->columns values:values startingAt:1+nchanged bindNulls:isInsert]; + + [*adaptor bindResultsIntoInstancesOfClass:nil metaData:metaData]; + commited += updateCount; + } + + transaction = nil; + return commited; +} + +/** + Commit all pending inserts, updates, deletes to the database inside a transaction. + */ + +- (int)commitTransaction { + [self exec:"BEGIN TRANSACTION"]; + int updated = [self commit]; + return [self exec:"COMMIT"] ? updated : 0; +} + +/** + Rollback any outstanding inserts, updates, or deletes. Please note updated values + are also rolled back inside the actual record in the application as well. + */ + +- (int)rollback { + for ( NSMutableDictionary *d in *transaction ) { + OODictionary values = d; + + if ( !!~values[kOOUpdate] ) { + OORef record = ~values[kOOObject]; + OOMetaData *metaData = [self tableMetaDataForClass:[*record class]]; + +#ifndef OO_ARC + for ( NSString *name in *metaData->boxed ) + OO_RELEASE( (id)[[*record valueForKey:name] pointerValue] ); +#endif + + [*record setValuesForKeysWithDictionary:[metaData decode:values]]; + } + } + return (int)[*~transaction count]; +} + +/** + Find/create an instance of the OOMetaData class which describes a record class and its associated table. + If the table does not exist it will be created along with indexes for columns/ivars which have + upper case names for use in joins. Details of the tables parameters can be controlled by using + methods in the OOTableCustomisation protool. If it does not exist a meta table class which + prepresents OOMetaData records themselves is also created from which the list of all registered + tables can be selected. + */ + +- (OOMetaData *)tableMetaDataForClass:(Class)recordClass { + if ( !recordClass || recordClass == [OOMetaData class] ) + return [OOMetaData metaDataForClass:[OOMetaData class]]; + + OOString className = class_getName( recordClass ); + OOMetaData *metaData = tableMetaDataByClassName[className]; + + if ( !metaData ) { + metaData = [OOMetaData metaDataForClass:recordClass]; + +#ifdef OODEBUG_SQL + NSLog(@"\n%@", *metaData->createTableSQL); +#endif + + if ( metaData->tableName[0] != '_' && + [self stringForSql:"select count(*) from sqlite_master where name = '%@'", + *metaData->tableName] == "0" ) + if ( [self exec:"%@", *metaData->createTableSQL] ) + for ( NSString *idx in *metaData->indexes ) + if ( ![self exec:idx] ) + OOWarn( @"-[OOMetaData tableMetaDataForClass:] Error creating index: %@", idx ); + + tableMetaDataByClassName[className] = metaData; + } + + return metaData; +} + +@end + +#pragma mark OOAdaptor - implements all access to a particular database + +@implementation OOAdaptor + +/** + Connect to/create sqlite3 database + */ + +- (OOAdaptor *)initPath:(cOOString)path database:(OODatabase *)database { + if ( self = [super init] ) { + owner = database; + OOFile( OOFile( path ).directory() ).mkdir(); + if ( (owner->errcode = sqlite3_open( path, &db )) != SQLITE_OK ) { + OOWarn( @"-[OOAdaptor initPath:database:] Error opening database at path: %@", *path ); + return nil; + } + } + return self; +} + +/** + Prepare a sql statement after which values can be bound and results returned. + */ + +- (BOOL)prepare:(cOOString)sql { + if ( (owner->errcode = sqlite3_prepare_v2( db, owner->lastSQL = sql, -1, &stmt, 0 )) != SQLITE_OK ) + OOWarn(@"-[OOAdaptor prepare:] Could not prepare sql: \"%@\" - %s", *owner->lastSQL, owner->errmsg = (char *)sqlite3_errmsg( db ) ); + return owner->errcode == SQLITE_OK; +} + +- (int)bindValue:(id)value asParameter:(int)pno { +#ifdef OODEBUG_BIND + NSLog( @"-[OOAdaptor bindValue:bindValue:] bind parameter #%d as: %@", pno, value ); +#endif + if ( !value || value == OONull ) + return sqlite3_bind_null( stmt, pno ); +#if OOSQL_THREAD_SAFE_BUT_USES_MORE_MEMORY + else if ( [value isKindOfClass:[NSString class]] ) + return sqlite3_bind_text( stmt, pno, [value UTF8String], -1, SQLITE_STATIC ); +#else + else if ( [value isKindOfClass:[NSString class]] ) { + int len = (int)[value lengthOfBytesUsingEncoding:NSUTF8StringEncoding]; + struct _str_link *str = (struct _str_link *)malloc( sizeof *str + len ); + str->next = strs; + strs = str; + [value getCString:str->str maxLength:len+1 encoding:NSUTF8StringEncoding]; + return sqlite3_bind_text( stmt, pno, str->str, len, SQLITE_STATIC ); + } +#endif + else if ( [value isKindOfClass:[NSData class]] ) + return sqlite3_bind_blob( stmt, pno, [value bytes], (int)[value length], SQLITE_STATIC ); + + const char *type = [value objCType]; + if ( type ) + switch ( type[0] ) { + case 'c': case 's': case 'i': case 'l': + case 'C': case 'S': case 'I': case 'L': + return sqlite3_bind_int( stmt, pno, [value intValue] ); + case 'q': case 'Q': + return sqlite3_bind_int64( stmt, pno, [value longLongValue] ); + case 'f': case 'd': + return sqlite3_bind_double( stmt, pno, [value doubleValue] ); + } + + OOWarn( @"-[OOAdaptor bindValue:bindValue:] Undefined type in bind of parameter #%d: %s, value: %@", pno, type, value ); + return -1; +} + +/** + Bind parameters from a prepared SQL statement. The "objCType" method is used to determine the type to bind. + */ + +- (BOOL)bindCols:(cOOStringArray)columns values:(cOOValueDictionary)values startingAt:(int)pno bindNulls:(BOOL)bindNulls { + int errcode; + for ( NSString *name in *columns ) + if ( bindNulls || *values[name] != OONull ) + if ( (errcode = [self bindValue:values[name] asParameter:pno++]) != SQLITE_OK ) + OOWarn( @"-[OOAdaptor bindCols:...] Bind failed column: %@ - %s (%d)", name, owner->errmsg = (char *)sqlite3_errmsg( db ), owner->errcode = errcode ); + return owner->errcode == SQLITE_OK; +} + +/** + Return a dictionary containing the values for a row returned by the database from a select. + These values need to be decoded using a classes metadata to set the ivar values later. + */ + +- (OOValueDictionary)valuesForNextRow { + int ncols = sqlite3_column_count( stmt ); + OOValueDictionary values; + + for ( int i=0 ; i)bindResultsIntoInstancesOfClass:(Class)recordClass metaData:(OOMetaData *)metaData { + OOArray out; + BOOL awakeFromDB = [recordClass instancesRespondToSelector:@selector(awakeFromDB)]; + + while( (owner->errcode = sqlite3_step( stmt )) == SQLITE_ROW ) { + OOValueDictionary values = [self valuesForNextRow]; + if ( recordClass ) { + id record = [[recordClass alloc] init]; + [record setValuesForKeysWithDictionary:[metaData decode:values]]; + + if ( awakeFromDB ) + [record awakeFromDB]; + + out += record; + OO_RELEASE( record ); + } + else + out += values; + } + + if ( owner->errcode != SQLITE_DONE ) + OOWarn(@"-[OOAdaptor bindResultsIntoInstancesOfClass:metaData:] Not done (bind) stmt: %@ - %s", *owner->lastSQL, owner->errmsg = (char *)sqlite3_errmsg( db ) ); + else { + owner->errcode = SQLITE_OK; + out.alloc(); + } + + while ( strs != NULL ) { + struct _str_link *next = strs->next; + free( strs ); + strs = next; + } + owner->updateCount = sqlite3_changes( db ); + sqlite3_finalize( stmt ); + return out; +} + +- (sqlite_int64)lastInsertRowID { + return sqlite3_last_insert_rowid( db ); +} + +- (void) dealloc { + sqlite3_close( db ); + OO_DEALLOC( super ); +} + +@end + +#pragma mark OOMetaData instances represent a table in the database and it's record class + +@implementation OOMetaData + +static OODictionary metaDataByClass; +static OOMetaData *tableOfTables; + ++ (NSString *)ooTableTitle { return @"Table MetaData"; } + ++ (OOMetaData *)metaDataForClass:(Class)recordClass OO_RETURNS { + if ( !tableOfTables ) + OO_RELEASE( tableOfTables = [[OOMetaData alloc] initClass:[OOMetaData class]] ); + OOMetaData *metaData = metaDataByClass[recordClass]; + if ( !metaData ) + OO_RELEASE( metaData = [[OOMetaData alloc] initClass:recordClass] ); + return metaData; +} + ++ (OOArray)selectRecordsRelatedTo:(id)record { + return [[OODatabase sharedInstance] tablesRelatedByNaturalJoinFrom:record]; +} + +- initClass:(Class)aClass { + if ( !(self = [super init]) ) + return self; + recordClass = aClass; + metaDataByClass[recordClass] = self; + recordClassName = class_getName( recordClass ); + tableTitle = [recordClass respondsToSelector:@selector(ooTableTitle)] ? + [recordClass ooTableTitle] : *recordClassName; + tableName = [recordClass respondsToSelector:@selector(ooTableName)] ? + [recordClass ooTableName] : *recordClassName; + + if ( aClass == [OOMetaData class] ) { + ivars = columns = outcols = boxed = unbox = + "tableTitle tableName recordClassName keyColumns ivars columns outcols"; + return self; + } + + createTableSQL = OOFormat( @"create table %@ (", *tableName ); + + OOArray hierarchy; + do + hierarchy += aClass; + while ( (aClass = [aClass superclass]) && aClass != [NSObject class] ); + + for ( int h=(int)hierarchy-1 ; h>=0 ; h-- ) { + aClass = (Class)hierarchy[h]; /// + Ivar *ivarInfo = class_copyIvarList( aClass, NULL ); + if ( !ivarInfo ) + continue; + + for ( int in=0 ; ivarInfo[in] ; in++ ) { + OOString columnName = ivar_getName( ivarInfo[in] ); + ivars += columnName; + + OOString type = types[columnName] = ivar_getTypeEncoding( ivarInfo[in] ), dbtype = ""; + + SEL columnSel = sel_getUid(columnName); + switch ( type[0] ) { + case 'c': case 's': case 'i': case 'l': + case 'C': case 'S': case 'I': case 'L': + case 'q': case 'Q': + dbtype = @"int"; + break; + case 'f': case 'd': + dbtype = @"real"; + break; + case '{': + static OOPattern isOORef( "=\"ref\"@\"NS" ); + if( !(type & isOORef) ) + OOWarn( @"-[OOMetaData initClass:] Invalid structure type for ivar %@ in class %@: %@", *columnName, *recordClassName, *type ); + boxed += columnName; + if ( ![recordClass instancesRespondToSelector:columnSel] ) { + unbox += columnName; + if ( [[recordClass superclass] instancesRespondToSelector:columnSel] ) + OOWarn( @"-[OOMetaData initClass:] Superclass of class %@ is providing method for column: %@", *recordClassName, *columnName ); + } + case '@': + static OOPattern isNSString( "NS(Mutable)?String\"" ), + isNSDate( "\"NSDate\"" ), isNSData( "NS(Mutable)?Data\"" ); + if ( type & isNSString ) + dbtype = @"text"; + else if ( type & isNSDate ) { + dbtype = @"real"; + dates += columnName; + } + else { + if ( !(type & isNSData) ) + archived += columnName; + blobs += columnName; + dbtype = @"blob"; + } + break; + default: + OOWarn( @"-[OOMetaData initClass:] Unknown data type '%@' in class %@", *type, *tableName ); + archived += columnName; + blobs += columnName; + dbtype = @"blob"; + break; + } + + if ( dbtype == @"text" ) + tocopy += columnName; + + if ( columnName == @"rowid" || columnName == @"ROWID" || + columnName == @"OID" || columnName == @"_ROWID_" ) { + outcols += columnName; + continue; + } + + createTableSQL += OOFormat(@"%s\n\t%@ %@ /* %@ */", + !columns?"":",", *columnName, *dbtype, *type ); + + if ( iswupper( columnName[columnName[0] != '_' ? 0 : 1] ) ) + indexes += OOFormat(@"create index %@_%@ on %@ (%@)\n", + *tableName, *columnName, + *tableName, *columnName); + + if ( class_getName( [aClass superclass] )[0] != '_' ) { + columns += columnName; + outcols += columnName; + joinableColumns += columnName; + } + } + + free( ivarInfo ); + } + + if ( [recordClass respondsToSelector:@selector(ooTableKey)] ) + createTableSQL += OOFormat( @",\n\tprimary key (%@)", + *(keyColumns = [recordClass ooTableKey]) ); + + if ( [recordClass respondsToSelector:@selector(ooConstraints)] ) + createTableSQL += OOFormat( @",\n\t%@", [recordClass ooConstraints] ); + + createTableSQL += "\n)\n"; + + if ( [recordClass respondsToSelector:@selector(ooTableSql)] ) { + createTableSQL = [recordClass ooTableSql]; + indexes = nil; + } + + tableOfTables->tablesWithNaturalJoin += recordClassName; + tablesWithNaturalJoin += recordClassName; + + for( Class other in [*metaDataByClass allKeys] ) { + OOMetaData *otherMetaData = metaDataByClass[other]; + if ( other == recordClass || otherMetaData == tableOfTables ) + continue; + + if ( [self naturalJoinTo:otherMetaData->joinableColumns] > 0 ) + tablesWithNaturalJoin += otherMetaData->recordClassName; + if ( [otherMetaData naturalJoinTo:joinableColumns] > 0 ) + otherMetaData->tablesWithNaturalJoin += recordClassName; + } + + return self; +} + +/** + Find the columns shared between two classes and that have upper case names (are indexed). + */ + +- (OOStringArray)naturalJoinTo:(cOOStringArray)to { + //NSLog( @"%@ -- %@", *columns, *to ); + OOStringArray commonColumns = columns & to; + for ( int i=0 ; i)import:(const OOArray > &)nodes intoClass:(Class)recordClass { + OOMetaData *metaData = [self metaDataForClass:recordClass]; + OOArray out; + + for ( NSMutableDictionary *dict in *nodes ) { + OOStringDictionary node = dict, values; + for ( NSString *ivar in *metaData->columns ) + values[ivar] = node[ivar]; + + id record = [[recordClass alloc] init]; + [record setValuesForKeysWithDictionary:[metaData decode:values]]; + out += record; + OO_RELEASE( record ); + } + + return out; +} + +/** + Convert a string taken from a flat file into record instances which can be inserted into the database. + */ + ++ (OOArray)import:(cOOString)string intoClass:(Class)recordClass delimiter:(cOOString)delim { + OOMetaData *metaData = [self metaDataForClass:recordClass]; + // remove escaped newlines then split by newline + OOStringArray lines = (string - @"\\\\\n") / @"\n"; + lines--; // pop last empty line + + OOArray out; + for ( int l=0 ; l values; + values[metaData->columns] = *lines[l] / delim; + + // empty columns are taken as null values + for ( NSString *key in *metaData->columns ) + if ( [*values[key] isEqualToString:@""] ) + values[key] = OONull; + + // convert description strings to NSData + for ( NSString *key in *metaData->blobs ) + OO_RELEASE( values[key] = (NSString *)[[NSData alloc] initWithDescription:values[key]] ); + + id record = [[recordClass alloc] init]; + [record setValuesForKeysWithDictionary:[metaData decode:values]]; + out += record; + OO_RELEASE( record ); + } + + return out; +} + +/** + Convert a set of records selected from the database into a string which can be saved to disk. + */ + ++ (OOString)export:(const OOArray &)array delimiter:(cOOString)delim { + OOMetaData *metaData = nil; + OOString out; + + for ( id record in *array ) { + if ( !metaData ) + metaData = [record isKindOfClass:[NSDictionary class]] ? + OONull : [self metaDataForClass:[record class]]; + + OODictionary values = metaData == OONull ? record : + *[metaData encode:[record dictionaryWithValuesForKeys:metaData->columns]]; + + OOStringArray line; + NSString *blank = @""; + for ( NSString *key in *metaData->columns ) + line += *values[key] != OONull ? [values[key] stringValue] : blank; + + out += line/delim+"\n"; + } + + return out; +} + +/** + Bind a record to a view containing elements which are to display values from the record. + The ivar number is selected by the subview's tag value and it's ".text" property if set to + the value returned record value "stringValue" for the ivar. Supports images stored as + NSData objects, UISwitches bound to boolean valuea and UITextField for alll other values. + */ + ++ (void)bindRecord:(id)record toView:(OOView *)view delegate:(id)delegate { +#ifdef __IPHONE_OS_VERSION_MIN_REQUIRED + OOMetaData *metaData = [self metaDataForClass:[record class]]; + OOValueDictionary values = [metaData encode:[record dictionaryWithValuesForKeys:metaData->ivars]]; + + for ( int i=0 ; iivars ; i++ ) { + UILabel *label = (UILabel *)[view viewWithTag:1+i]; + id value = values[metaData->ivars[i]]; + + if ( [label isKindOfClass:[UIImageView class]] ) + ((UIImageView *)label).image = value != OONull ? [UIImage imageWithData:(NSData *)value] : nil; + else if ( [label isKindOfClass:[UISwitch class]] ) { + UISwitch *uiSwitch = (UISwitch *)label; + uiSwitch.on = value != OONull ? [value charValue] : 0; + if ( delegate ) + [uiSwitch addTarget:delegate action:@selector(valueChanged:) forControlEvents:UIControlEventValueChanged]; + } + else if ( [label isKindOfClass:[UIWebView class]] ) + [(UIWebView *)label loadHTMLString:value != OONull ? value : @"" baseURL:nil]; + else if ( label ) { + label.text = value != OONull ? [value stringValue] : @""; + if ( [label isKindOfClass:[UITextView class]] ) { + [(UITextView *)label setContentOffset:CGPointMake(0,0) animated:NO]; + [(UITextView *)label scrollRangeToVisible:NSMakeRange(0,0)]; + } + } + + if ( [label respondsToSelector:@selector(delegate)] ) + ((UITextField *)label).delegate = delegate; + label.hidden = NO; + + if ( (label = (UILabel *)[view viewWithTag:-1-i]) ) { + label.text = **metaData->ivars[i]; + label.hidden = NO; + } + } + + OOView *subView; + for ( int i=metaData->ivars ; (subView = [view viewWithTag:1+i]) ; i++ ) { + subView.hidden = YES; + if ( (subView = [view viewWithTag:-1-i]) ) + subView.hidden =YES; + } +#endif +} + +/** + When the delegate method fires this method should be called to update + the record with the modified value before updating the database. + */ + ++ (void)updateRecord:(id)record fromView:(OOView *)view { +#ifdef __IPHONE_OS_VERSION_MIN_REQUIRED + if ( view.tag > 0 && [view respondsToSelector:@selector(text)] ) { + OOMetaData *metaData = [self metaDataForClass:[record class]]; + NSString *name = *metaData->ivars[view.tag-1]; + OOString type = metaData->types[name]; + id value = OO_RETAIN(((UITextField *)view).text ); + + if ( type[0] == '{' ) { +#ifdef OO_ARC + ooArcRetain( value ); +#endif + value = [[NSValue alloc] initWithBytes:&value objCType:@encode(id)]; +#ifndef OO_ARC + OO_RELEASE( (id)[[record valueForKey:name] pointerValue] ); +#endif + } + + [record setValue:value forKey:name]; + OO_RELEASE( value ); + } + for ( OOView *subview in [view subviews] ) + [self updateRecord:record fromView:subview]; +#endif +} + +@end + +@implementation OOView(OOExtras) + +- copyView { + NSData *archived = [NSKeyedArchiver archivedDataWithRootObject:self]; + OOView *copy = [NSKeyedUnarchiver unarchiveObjectWithData:archived]; +#ifdef __IPHONE_OS_VERSION_MIN_REQUIRED + copy.frame = CGRectMake(0.0, 0.0, self.frame.size.width, self.frame.size.height); +#else + copy.frame = NSMakeRect(0.0, 0.0, self.frame.size.width, self.frame.size.height); +#endif + return copy; +} + +@end + +@implementation NSData(OOExtras) + +static int unhex ( unsigned char ch ) { + return ch >= 'a' ? 10 + ch - 'a' : ch >= 'A' ? 10 + ch - 'A' : ch - '0'; +} + +- initWithDescription:(NSString *)description { + NSInteger len = [description length]/2, lin = [description lengthOfBytesUsingEncoding:NSUTF8StringEncoding]; + char *bytes = (char *)malloc( len ), *optr = bytes, *hex = (char *)malloc( lin+1 ); + [description getCString:hex maxLength:lin+1 encoding:NSUTF8StringEncoding]; + + for ( char *iptr = hex ; *iptr ; iptr+=2 ) { + if ( *iptr == '<' || *iptr == ' ' || *iptr == '>' ) + iptr--; + else + *optr++ = unhex( *iptr )*16 + unhex( *(iptr+1) ); + } + + free( hex ); + return [self initWithBytesNoCopy:bytes length:optr-bytes freeWhenDone:YES]; +} + +- (NSString *)stringValue { return [self description]; } + +@end + +@interface NSString(OOExtras) +@end +@implementation NSString(OOExtras) +- (char)charValue { return [self intValue]; } +- (char)shortValue { return [self intValue]; } +- (NSString *)stringValue { return self; } +@end + +@interface NSArray(OOExtras) +@end +@implementation NSArray(OOExtras) +- (NSString *)stringValue { + static OOReplace reformat( "/(\\s)\\s+|^\\(|\\)$|\"/$1/" ); + return &([self description] | reformat); +} +@end + +@interface NSDictionary(OOExtras) +@end +@implementation NSDictionary(OOExtras) +- (NSString *)stringValue { + static OOReplace reformat( "/(\\s)\\s+|^\\{|\\}$|\"/$1/" ); + return &([self description] | reformat); +} +@end + +#ifdef __IPHONE_OS_VERSION_MIN_REQUIRED +@interface UISwitch(OOExtras) +@end +@implementation UISwitch(OOExtras) +- (NSString *)text { return self.on ? @"1" : @"0"; } +@end +#endif + From 395f4375da24d0d35c181d96ee0f204d2c453bc0 Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Tue, 26 Feb 2013 16:05:55 -0800 Subject: [PATCH 3/3] Update samples --- lib/linguist/samples.json | 2865 ++++++++++++++++++++++++++++++++++--- 1 file changed, 2657 insertions(+), 208 deletions(-) diff --git a/lib/linguist/samples.json b/lib/linguist/samples.json index 86040953..940e063c 100644 --- a/lib/linguist/samples.json +++ b/lib/linguist/samples.json @@ -155,6 +155,9 @@ ".h", ".m" ], + "Objective-C++": [ + ".mm" + ], "OCaml": [ ".eliom", ".ml" @@ -349,8 +352,8 @@ ".gemrc" ] }, - "tokens_total": 304314, - "languages_total": 353, + "tokens_total": 329637, + "languages_total": 357, "tokens": { "ApacheConf": { "ServerSignature": 1, @@ -1581,78 +1584,78 @@ "END": 1 }, "C": { - "#include": 138, - "const": 326, - "char": 394, + "#include": 149, + "const": 357, + "char": 529, "*blob_type": 2, - ";": 4325, - "struct": 224, + ";": 5439, + "struct": 359, "blob": 6, "*lookup_blob": 2, - "(": 5104, - "unsigned": 134, + "(": 6213, + "unsigned": 140, "*sha1": 16, - ")": 5106, - "{": 1372, + ")": 6215, + "{": 1528, "object": 10, - "*obj": 5, + "*obj": 9, "lookup_object": 2, "sha1": 20, - "if": 938, - "obj": 18, - "return": 501, + "if": 1015, + "obj": 48, + "return": 529, "create_object": 2, "OBJ_BLOB": 3, "alloc_blob_node": 1, - "-": 1725, - "type": 28, + "-": 1803, + "type": 36, "error": 96, "sha1_to_hex": 8, "typename": 2, - "NULL": 281, - "}": 1385, - "*": 190, - "int": 359, + "NULL": 330, + "}": 1544, + "*": 253, + "int": 446, "parse_blob_buffer": 2, "*item": 10, - "void": 250, + "void": 279, "*buffer": 6, - "long": 99, - "size": 110, + "long": 105, + "size": 120, "item": 24, "object.parsed": 4, - "#ifndef": 70, + "#ifndef": 84, "BLOB_H": 2, - "#define": 684, - "extern": 35, - "#endif": 164, + "#define": 911, + "extern": 37, + "#endif": 236, "git_cache_init": 1, "git_cache": 4, "*cache": 4, - "size_t": 40, + "size_t": 52, "git_cached_obj_freeptr": 1, "free_ptr": 2, - "<": 185, + "<": 219, "git__size_t_powerof2": 1, "cache": 26, "size_mask": 6, "lru_count": 1, "free_obj": 4, "git_mutex_init": 1, - "&": 425, + "&": 442, "lock": 6, "nodes": 10, "git__malloc": 3, - "sizeof": 67, + "sizeof": 71, "git_cached_obj": 5, "GITERR_CHECK_ALLOC": 3, "memset": 4, "git_cache_free": 1, - "i": 363, + "i": 410, "for": 88, - "+": 543, - "[": 422, - "]": 422, + "+": 551, + "[": 597, + "]": 597, "git_cached_obj_decref": 3, "git__free": 15, "*git_cache_get": 1, @@ -1667,7 +1670,7 @@ "id": 13, "git_mutex_lock": 2, "node": 9, - "&&": 224, + "&&": 248, "git_oid_cmp": 6, "git_cached_obj_incref": 3, "result": 48, @@ -1677,10 +1680,10 @@ "*entry": 2, "_entry": 1, "entry": 17, - "else": 170, + "else": 190, "save_commit_buffer": 3, "*commit_type": 2, - "static": 80, + "static": 454, "commit": 59, "*check_commit": 1, "quiet": 5, @@ -1695,7 +1698,7 @@ "*ref_name": 2, "*c": 69, "lookup_commit_reference": 2, - "c": 247, + "c": 252, "die": 5, "_": 3, "ref_name": 2, @@ -1705,20 +1708,20 @@ "*lookup_commit": 2, "alloc_commit_node": 1, "*lookup_commit_reference_by_name": 2, - "*name": 6, + "*name": 12, "*commit": 10, "get_sha1": 1, - "name": 16, - "||": 133, + "name": 28, + "||": 141, "parse_commit": 3, "parse_commit_date": 2, - "*buf": 9, + "*buf": 10, "*tail": 2, "*dateptr": 1, - "buf": 56, + "buf": 57, "tail": 12, "memcmp": 6, - "while": 64, + "while": 70, "dateptr": 2, "strtoul": 2, "commit_graft": 13, @@ -1729,7 +1732,7 @@ "lo": 6, "hi": 5, "mi": 5, - "/": 7, + "/": 9, "*graft": 3, "cmp": 9, "graft": 10, @@ -1745,15 +1748,15 @@ "parent": 7, "commit_list": 35, "**pptr": 1, - "<=>": 15, + "<=>": 16, "bufptr": 12, "46": 1, "tree": 3, "5": 1, "45": 1, - "n": 37, + "n": 70, "bogus": 1, - "s": 139, + "s": 154, "get_sha1_hex": 2, "lookup_tree": 1, "pptr": 5, @@ -1783,9 +1786,9 @@ "*eol": 1, "*p": 9, "commit_buffer": 1, - "a": 28, + "a": 80, "b_date": 3, - "b": 23, + "b": 66, "a_date": 2, "*commit_list_get_next": 1, "*a": 9, @@ -1859,9 +1862,9 @@ "*line_separator": 1, "userformat_find_requirements": 1, "*fmt": 2, - "*w": 1, + "*w": 2, "format_commit_message": 1, - "*format": 1, + "*format": 2, "*context": 1, "pretty_print_commit": 1, "*pp": 4, @@ -1886,9 +1889,9 @@ "list": 1, "lifo": 1, "FLEX_ARRAY": 1, - "typedef": 138, + "typedef": 189, "*read_graft_line": 1, - "len": 29, + "len": 30, "*lookup_commit_graft": 1, "*get_merge_bases": 1, "*rev1": 1, @@ -1920,12 +1923,12 @@ "*revision": 1, "*patch_mode": 1, "**pathspec": 1, - "inline": 2, + "inline": 3, "single_parent": 1, "*reduce_heads": 1, "commit_extra_header": 7, "*key": 5, - "*value": 3, + "*value": 5, "append_merge_tag_headers": 1, "***tail": 1, "commit_tree": 1, @@ -1958,7 +1961,7 @@ "": 1, "": 1, "": 1, - "#ifdef": 52, + "#ifdef": 64, "CONFIG_SMP": 1, "DEFINE_MUTEX": 1, "cpu_add_remove_lock": 3, @@ -1973,7 +1976,7 @@ "task_struct": 5, "*active_writer": 1, "mutex": 1, - "refcount": 1, + "refcount": 2, "cpu_hotplug": 1, ".active_writer": 1, ".lock": 1, @@ -1987,16 +1990,16 @@ "cpu_hotplug.refcount": 3, "EXPORT_SYMBOL_GPL": 4, "put_online_cpus": 2, - "unlikely": 1, + "unlikely": 54, "wake_up_process": 1, "cpu_hotplug_begin": 4, - "likely": 1, - "break": 241, + "likely": 22, + "break": 244, "__set_current_state": 1, "TASK_UNINTERRUPTIBLE": 1, "schedule": 1, "cpu_hotplug_done": 4, - "#else": 59, + "#else": 94, "__ref": 6, "register_cpu_notifier": 2, "notifier_block": 3, @@ -2009,7 +2012,7 @@ "nr_to_call": 2, "*nr_calls": 1, "__raw_notifier_call_chain": 1, - "v": 7, + "v": 11, "nr_calls": 9, "notifier_to_errno": 1, "cpu_notify": 5, @@ -2025,8 +2028,8 @@ "rcu_read_lock": 1, "for_each_process": 2, "p": 60, - "*t": 1, - "t": 27, + "*t": 2, + "t": 32, "find_lock_task_mm": 1, "cpumask_clear_cpu": 5, "mm_cpumask": 1, @@ -2045,7 +2048,7 @@ "KERN_WARNING": 3, "comm": 1, "task_pid_nr": 1, - "flags": 86, + "flags": 89, "write_unlock_irq": 1, "take_cpu_down_param": 3, "mod": 13, @@ -2057,7 +2060,7 @@ "err": 38, "__cpu_disable": 1, "CPU_DYING": 1, - "|": 123, + "|": 132, "param": 2, "hcpu": 10, "_cpu_down": 3, @@ -2072,7 +2075,7 @@ "CPU_DOWN_PREPARE": 1, "CPU_DOWN_FAILED": 2, "__func__": 2, - "goto": 93, + "goto": 159, "out_release": 3, "__stop_machine": 1, "cpumask_of": 1, @@ -2103,8 +2106,8 @@ "*pgdat": 1, "cpu_possible": 1, "KERN_ERR": 5, - "#if": 46, - "defined": 25, + "#if": 92, + "defined": 42, "CONFIG_IA64": 1, "cpu_to_node": 1, "node_online": 1, @@ -2147,13 +2150,13 @@ "cpu_hotplug_pm_callback": 2, "action": 2, "*ptr": 1, - "switch": 40, - "case": 258, + "switch": 46, + "case": 273, "PM_SUSPEND_PREPARE": 1, "PM_HIBERNATION_PREPARE": 1, "PM_POST_SUSPEND": 1, "PM_POST_HIBERNATION": 1, - "default": 30, + "default": 33, "NOTIFY_DONE": 1, "NOTIFY_OK": 1, "cpu_hotplug_pm_sync_init": 2, @@ -2163,9 +2166,9 @@ "cpumask_test_cpu": 1, "CPU_STARTING_FROZEN": 1, "MASK_DECLARE_1": 3, - "x": 24, + "x": 57, "UL": 1, - "<<": 55, + "<<": 56, "MASK_DECLARE_2": 3, "MASK_DECLARE_4": 3, "MASK_DECLARE_8": 9, @@ -2222,7 +2225,7 @@ "git_buf_free": 4, "diff_pathspec_is_interesting": 2, "*str": 1, - "count": 15, + "count": 17, "false": 77, "true": 73, "str": 162, @@ -2264,7 +2267,7 @@ "*d": 1, "git_pool": 4, "*pool": 3, - "d": 12, + "d": 16, "fail": 19, "*diff_delta__merge_like_cgit": 1, "*b": 6, @@ -2307,7 +2310,7 @@ "new_oid": 3, "git_oid_iszero": 2, "*diff_strdup_prefix": 1, - "strlen": 16, + "strlen": 17, "git_pool_strcat": 1, "git_pool_strndup": 1, "diff_delta__cmp": 3, @@ -2452,15 +2455,15 @@ "onto_pool": 7, "git_vector": 1, "onto_new": 6, - "j": 202, + "j": 206, "onto": 7, "from": 16, "deltas.length": 4, - "*o": 4, + "*o": 8, "GIT_VECTOR_GET": 2, "*f": 2, - "f": 180, - "o": 18, + "f": 184, + "o": 80, "diff_delta__merge_like_cgit": 1, "git_vector_swap": 1, "git_pool_swap": 1, @@ -2475,13 +2478,13 @@ "want": 3, "pager_command_config": 2, "*var": 1, - "*data": 11, + "*data": 12, "data": 69, "prefixcmp": 3, "var": 7, "cmd": 46, "git_config_maybe_bool": 1, - "value": 5, + "value": 9, "xstrdup": 2, "check_pager_config": 3, "c.cmd": 1, @@ -2526,7 +2529,7 @@ "have_repository": 1, "trace_repo_setup": 1, "setup_work_tree": 1, - "fn": 1, + "fn": 5, "fstat": 1, "fileno": 1, "stdout": 5, @@ -2651,7 +2654,7 @@ "STRBUF_INIT": 1, "*tmp": 1, "strbuf_addf": 1, - "tmp": 2, + "tmp": 6, "cmd.buf": 1, "run_command_v_opt": 1, "RUN_SILENT_EXEC_FAILURE": 1, @@ -2699,7 +2702,7 @@ "HELLO_H": 2, "hello": 1, "": 5, - "": 1, + "": 2, "": 3, "": 3, "": 4, @@ -2709,11 +2712,11 @@ "HTTP_PARSER_DEBUG": 4, "SET_ERRNO": 47, "e": 4, - "do": 15, + "do": 21, "parser": 334, "http_errno": 11, "error_lineno": 3, - "__LINE__": 1, + "__LINE__": 50, "CALLBACK_NOTIFY_": 3, "FOR": 11, "ER": 4, @@ -2744,7 +2747,7 @@ "string": 18, "#string": 1, "HTTP_METHOD_MAP": 3, - "#undef": 6, + "#undef": 7, "tokens": 5, "int8_t": 3, "unhex": 3, @@ -2841,15 +2844,15 @@ "classes": 1, "depends": 1, "on": 4, - "strict": 1, + "strict": 2, "define": 14, "CR": 18, - "r": 5, + "r": 58, "LF": 21, "LOWER": 7, "0x20": 1, "IS_ALPHA": 5, - "z": 1, + "z": 47, "IS_NUM": 14, "9": 1, "IS_ALPHANUM": 3, @@ -2897,7 +2900,7 @@ "HPE_INVALID_CONSTANT": 3, "method": 39, "HTTP_HEAD": 2, - "index": 57, + "index": 58, "STRICT_CHECK": 15, "HPE_INVALID_VERSION": 12, "http_major": 11, @@ -2963,17 +2966,17 @@ "Does": 1, "the": 91, "need": 5, - "to": 36, + "to": 37, "see": 2, "an": 2, "EOF": 26, "find": 1, "end": 48, - "of": 43, - "message": 1, + "of": 44, + "message": 3, "http_should_keep_alive": 2, "http_method_str": 1, - "m": 3, + "m": 8, "http_parser_init": 2, "http_parser_type": 3, "http_errno_name": 1, @@ -2989,7 +2992,7 @@ "http_parser_url_fields": 2, "uf": 14, "old_uf": 4, - "u": 10, + "u": 18, "port": 7, "field_set": 5, "UF_MAX": 3, @@ -3007,13 +3010,13 @@ "paused": 3, "HPE_PAUSED": 2, "http_parser_h": 2, - "__cplusplus": 8, + "__cplusplus": 18, "HTTP_PARSER_VERSION_MAJOR": 1, "HTTP_PARSER_VERSION_MINOR": 1, "": 2, - "_WIN32": 2, + "_WIN32": 3, "__MINGW32__": 1, - "_MSC_VER": 4, + "_MSC_VER": 5, "__int8": 2, "__int16": 2, "int16_t": 1, @@ -3085,7 +3088,7 @@ "HTTP_ERRNO_GEN": 3, "HPE_##n": 1, "HTTP_PARSER_ERRNO_LINE": 2, - "short": 3, + "short": 6, "http_cb": 3, "on_message_begin": 1, "http_data_cb": 4, @@ -3135,7 +3138,7 @@ "find_block_tag": 1, "work.size": 5, "cb.blockhtml": 6, - "ob": 8, + "ob": 14, "opaque": 8, "parse_table_row": 1, "columns": 3, @@ -3340,10 +3343,10 @@ "VALUE": 13, "rb_cRDiscount": 4, "rb_rdiscount_to_html": 2, - "self": 6, + "self": 9, "*res": 2, "szres": 8, - "encoding": 13, + "encoding": 14, "rb_funcall": 14, "rb_intern": 15, "rb_str_buf_new": 2, @@ -3391,11 +3394,11 @@ "": 2, "": 1, "": 1, - "": 2, + "": 3, "": 1, "sharedObjectsStruct": 1, "shared": 1, - "double": 7, + "double": 126, "R_Zero": 2, "R_PosInf": 2, "R_NegInf": 2, @@ -3546,7 +3549,7 @@ "bitopCommand": 1, "bitcountCommand": 1, "redisLogRaw": 3, - "level": 11, + "level": 12, "syslogLevelMap": 2, "LOG_DEBUG": 1, "LOG_INFO": 1, @@ -3638,7 +3641,7 @@ "key": 9, "dictGenHashFunction": 5, "dictSdsHash": 4, - "char*": 158, + "char*": 166, "dictSdsCaseHash": 2, "dictGenCaseHashFunction": 1, "dictEncObjKeyCompare": 4, @@ -3658,7 +3661,7 @@ "clusterNodesDictType": 1, "htNeedsResize": 3, "dict": 11, - "*dict": 2, + "*dict": 5, "used": 10, "dictSlots": 3, "dictSize": 10, @@ -3759,7 +3762,7 @@ "listNode": 4, "*head": 1, "listRotate": 1, - "head": 2, + "head": 3, "listFirst": 2, "listNodeValue": 3, "run_with_period": 6, @@ -3873,7 +3876,7 @@ "shared.lpop": 1, "REDIS_SHARED_INTEGERS": 1, "shared.integers": 2, - "void*": 134, + "void*": 135, "REDIS_SHARED_BULKHDR_LEN": 1, "shared.mbulkhdr": 1, "shared.bulkhdr": 1, @@ -4098,14 +4101,14 @@ "addReplyMultiBulkLen": 1, "addReplyBulkLongLong": 2, "bytesToHuman": 3, - "*s": 2, + "*s": 3, "sprintf": 10, "n/": 3, "LL*1024*1024": 2, "LL*1024*1024*1024": 1, "genRedisInfoString": 2, "*section": 2, - "info": 63, + "info": 64, "uptime": 2, "rusage": 1, "self_ru": 2, @@ -4131,8 +4134,8 @@ "name.release": 1, "name.machine": 1, "aeGetApiName": 1, - "__GNUC__": 2, - "__GNUC_MINOR__": 1, + "__GNUC__": 7, + "__GNUC_MINOR__": 2, "__GNUC_PATCHLEVEL__": 1, "uptime/": 1, "*24": 1, @@ -4175,7 +4178,7 @@ "REDIS_REPL_WAIT_BGSAVE_END": 1, "REDIS_REPL_SEND_BULK": 1, "REDIS_REPL_ONLINE": 1, - "float": 18, + "float": 26, "self_ru.ru_stime.tv_sec": 1, "self_ru.ru_stime.tv_usec/1000000": 1, "self_ru.ru_utime.tv_sec": 1, @@ -4197,7 +4200,7 @@ "slaves": 3, "obuf_bytes": 3, "getClientOutputBufferMemoryUsage": 1, - "k": 7, + "k": 15, "keys_freed": 3, "bestval": 5, "bestkey": 9, @@ -4219,7 +4222,7 @@ "daemonize": 2, "STDIN_FILENO": 1, "STDERR_FILENO": 2, - "version": 3, + "version": 4, "usage": 2, "redisAsciiArt": 2, "*16": 2, @@ -4350,7 +4353,7 @@ "RF_LITTLE_ENDIAN": 23, "fread": 12, "endianess": 40, - "needed": 9, + "needed": 10, "rfUTILS_SwapEndianUS": 10, "RF_HEXGE_US": 4, "xD800": 8, @@ -4387,7 +4390,7 @@ "opening": 2, "bracket": 4, "calling": 4, - "C": 13, + "C": 14, "xA": 1, "RF_CR": 1, "xD": 1, @@ -4422,14 +4425,14 @@ "i_MODE_": 2, "i_rfLMS_WRAP2": 5, "rfPclose": 1, - "stream": 2, + "stream": 3, "///closing": 1, "#endif//include": 1, "guards": 2, "": 1, "": 2, "local": 5, - "stack": 5, + "stack": 6, "memory": 4, "RF_OPTION_DEFAULT_ARGUMENTS": 24, "RF_String*": 222, @@ -4453,7 +4456,7 @@ "RF_UTF16_BE": 7, "codepoints": 44, "i/2": 2, - "#elif": 10, + "#elif": 14, "RF_UTF32_LE": 3, "RF_UTF32_BE": 3, "UTF16": 4, @@ -4625,7 +4628,7 @@ "RF_CASE_IGNORE": 2, "strstr": 2, "RF_MATCH_WORD": 5, - "exact": 4, + "exact": 6, "": 1, "0x5a": 1, "0x7a": 1, @@ -4939,7 +4942,7 @@ "i_SELECT_RF_STRING_INIT": 1, "i_SELECT_RF_STRING_INIT1": 1, "i_SELECT_RF_STRING_INIT0": 1, - "code": 2, + "code": 6, "i_SELECT_RF_STRING_CREATE_NC": 1, "i_SELECT_RF_STRING_CREATE_NC1": 1, "i_SELECT_RF_STRING_CREATE_NC0": 1, @@ -5149,7 +5152,7 @@ "i_SELECT_RF_STRING_FWRITE0": 1, "rfString_Fwrite_fUTF8": 1, "closing": 1, - "#error": 2, + "#error": 4, "Attempted": 1, "manipulation": 1, "flag": 1, @@ -5158,6 +5161,981 @@ "added": 1, "you": 1, "#endif//": 1, + "PY_SSIZE_T_CLEAN": 1, + "Py_PYTHON_H": 1, + "Python": 2, + "headers": 1, + "compile": 1, + "extensions": 1, + "please": 1, + "install": 1, + "development": 1, + "Python.": 1, + "PY_VERSION_HEX": 11, + "Cython": 1, + "requires": 1, + ".": 1, + "offsetof": 2, + "member": 2, + "type*": 1, + "WIN32": 2, + "MS_WINDOWS": 2, + "__stdcall": 2, + "__cdecl": 2, + "__fastcall": 2, + "DL_IMPORT": 2, + "DL_EXPORT": 2, + "PY_LONG_LONG": 5, + "LONG_LONG": 1, + "Py_HUGE_VAL": 2, + "HUGE_VAL": 1, + "PYPY_VERSION": 1, + "CYTHON_COMPILING_IN_PYPY": 3, + "CYTHON_COMPILING_IN_CPYTHON": 6, + "Py_ssize_t": 35, + "PY_SSIZE_T_MAX": 1, + "INT_MAX": 1, + "PY_SSIZE_T_MIN": 1, + "INT_MIN": 1, + "PY_FORMAT_SIZE_T": 1, + "CYTHON_FORMAT_SSIZE_T": 2, + "PyInt_FromSsize_t": 6, + "PyInt_FromLong": 3, + "PyInt_AsSsize_t": 3, + "__Pyx_PyInt_AsInt": 2, + "PyNumber_Index": 1, + "PyNumber_Check": 2, + "PyFloat_Check": 2, + "PyNumber_Int": 1, + "PyErr_Format": 4, + "PyExc_TypeError": 4, + "Py_TYPE": 7, + "tp_name": 4, + "PyObject*": 24, + "__Pyx_PyIndex_Check": 3, + "PyComplex_Check": 1, + "PyIndex_Check": 2, + "PyErr_WarnEx": 1, + "category": 2, + "stacklevel": 1, + "PyErr_Warn": 1, + "__PYX_BUILD_PY_SSIZE_T": 2, + "Py_REFCNT": 1, + "ob_refcnt": 1, + "ob_type": 7, + "Py_SIZE": 1, + "PyVarObject*": 1, + "ob_size": 1, + "PyVarObject_HEAD_INIT": 1, + "PyObject_HEAD_INIT": 1, + "PyType_Modified": 1, + "PyObject": 276, + "itemsize": 1, + "readonly": 1, + "ndim": 2, + "*shape": 1, + "*strides": 1, + "*suboffsets": 1, + "*internal": 1, + "Py_buffer": 6, + "PyBUF_SIMPLE": 1, + "PyBUF_WRITABLE": 3, + "PyBUF_FORMAT": 3, + "PyBUF_ND": 2, + "PyBUF_STRIDES": 6, + "PyBUF_C_CONTIGUOUS": 1, + "PyBUF_F_CONTIGUOUS": 1, + "PyBUF_ANY_CONTIGUOUS": 1, + "PyBUF_INDIRECT": 2, + "PyBUF_RECORDS": 1, + "PyBUF_FULL": 1, + "PY_MAJOR_VERSION": 13, + "__Pyx_BUILTIN_MODULE_NAME": 2, + "__Pyx_PyCode_New": 2, + "l": 7, + "fv": 4, + "cell": 4, + "fline": 4, + "lnos": 4, + "PyCode_New": 2, + "PY_MINOR_VERSION": 1, + "PyUnicode_FromString": 2, + "PyUnicode_Decode": 1, + "Py_TPFLAGS_CHECKTYPES": 1, + "Py_TPFLAGS_HAVE_INDEX": 1, + "Py_TPFLAGS_HAVE_NEWBUFFER": 1, + "PyUnicode_KIND": 1, + "CYTHON_PEP393_ENABLED": 2, + "__Pyx_PyUnicode_READY": 2, + "op": 8, + "PyUnicode_IS_READY": 1, + "_PyUnicode_Ready": 1, + "__Pyx_PyUnicode_GET_LENGTH": 2, + "PyUnicode_GET_LENGTH": 1, + "__Pyx_PyUnicode_READ_CHAR": 2, + "PyUnicode_READ_CHAR": 1, + "__Pyx_PyUnicode_READ": 2, + "PyUnicode_READ": 1, + "PyUnicode_GET_SIZE": 1, + "Py_UCS4": 2, + "PyUnicode_AS_UNICODE": 1, + "Py_UNICODE*": 1, + "PyBaseString_Type": 1, + "PyUnicode_Type": 2, + "PyStringObject": 2, + "PyUnicodeObject": 1, + "PyString_Type": 2, + "PyString_Check": 2, + "PyUnicode_Check": 1, + "PyString_CheckExact": 2, + "PyUnicode_CheckExact": 1, + "PyBytesObject": 1, + "PyBytes_Type": 1, + "PyBytes_Check": 1, + "PyBytes_CheckExact": 1, + "PyBytes_FromString": 2, + "PyString_FromString": 2, + "PyBytes_FromStringAndSize": 1, + "PyString_FromStringAndSize": 1, + "PyBytes_FromFormat": 1, + "PyString_FromFormat": 1, + "PyBytes_DecodeEscape": 1, + "PyString_DecodeEscape": 1, + "PyBytes_AsString": 2, + "PyString_AsString": 1, + "PyBytes_AsStringAndSize": 1, + "PyString_AsStringAndSize": 1, + "PyBytes_Size": 1, + "PyString_Size": 1, + "PyBytes_AS_STRING": 1, + "PyString_AS_STRING": 1, + "PyBytes_GET_SIZE": 1, + "PyString_GET_SIZE": 1, + "PyBytes_Repr": 1, + "PyString_Repr": 1, + "PyBytes_Concat": 1, + "PyString_Concat": 1, + "PyBytes_ConcatAndDel": 1, + "PyString_ConcatAndDel": 1, + "PySet_Check": 1, + "PyObject_TypeCheck": 3, + "PySet_Type": 2, + "PyFrozenSet_Check": 1, + "PyFrozenSet_Type": 1, + "PySet_CheckExact": 2, + "__Pyx_TypeCheck": 1, + "PyTypeObject": 25, + "PyIntObject": 1, + "PyLongObject": 2, + "PyInt_Type": 1, + "PyLong_Type": 1, + "PyInt_Check": 1, + "PyLong_Check": 1, + "PyInt_CheckExact": 1, + "PyLong_CheckExact": 1, + "PyInt_FromString": 1, + "PyLong_FromString": 1, + "PyInt_FromUnicode": 1, + "PyLong_FromUnicode": 1, + "PyLong_FromLong": 1, + "PyInt_FromSize_t": 1, + "PyLong_FromSize_t": 1, + "PyLong_FromSsize_t": 1, + "PyInt_AsLong": 2, + "PyLong_AsLong": 1, + "PyInt_AS_LONG": 1, + "PyLong_AS_LONG": 1, + "PyLong_AsSsize_t": 1, + "PyInt_AsUnsignedLongMask": 1, + "PyLong_AsUnsignedLongMask": 1, + "PyInt_AsUnsignedLongLongMask": 1, + "PyLong_AsUnsignedLongLongMask": 1, + "PyBoolObject": 1, + "Py_hash_t": 1, + "__Pyx_PyInt_FromHash_t": 2, + "__Pyx_PyInt_AsHash_t": 2, + "__Pyx_PySequence_GetSlice": 2, + "PySequence_GetSlice": 2, + "__Pyx_PySequence_SetSlice": 2, + "PySequence_SetSlice": 2, + "__Pyx_PySequence_DelSlice": 2, + "PySequence_DelSlice": 2, + "PyErr_SetString": 3, + "PyExc_SystemError": 3, + "tp_as_mapping": 3, + "PyMethod_New": 2, + "func": 3, + "klass": 1, + "PyInstanceMethod_New": 1, + "__Pyx_GetAttrString": 2, + "PyObject_GetAttrString": 2, + "__Pyx_SetAttrString": 2, + "PyObject_SetAttrString": 2, + "__Pyx_DelAttrString": 2, + "PyObject_DelAttrString": 2, + "__Pyx_NAMESTR": 2, + "__Pyx_DOCSTR": 2, + "__Pyx_PyNumber_Divide": 2, + "y": 14, + "PyNumber_TrueDivide": 1, + "__Pyx_PyNumber_InPlaceDivide": 2, + "PyNumber_InPlaceTrueDivide": 1, + "PyNumber_Divide": 1, + "PyNumber_InPlaceDivide": 1, + "__PYX_EXTERN_C": 3, + "_USE_MATH_DEFINES": 1, + "__PYX_HAVE__sklearn__linear_model__sgd_fast": 1, + "__PYX_HAVE_API__sklearn__linear_model__sgd_fast": 1, + "_OPENMP": 1, + "": 1, + "PYREX_WITHOUT_ASSERTIONS": 1, + "CYTHON_WITHOUT_ASSERTIONS": 1, + "CYTHON_INLINE": 65, + "__inline__": 1, + "__inline": 1, + "__STDC_VERSION__": 2, + "L": 1, + "CYTHON_UNUSED": 14, + "**p": 1, + "is_unicode": 1, + "is_str": 1, + "intern": 1, + "__Pyx_StringTabEntry": 2, + "__Pyx_PyBytes_FromUString": 1, + "__Pyx_PyBytes_AsUString": 1, + "__Pyx_Owned_Py_None": 1, + "Py_INCREF": 10, + "Py_None": 8, + "__Pyx_PyBool_FromLong": 1, + "Py_True": 2, + "Py_False": 2, + "__Pyx_PyObject_IsTrue": 1, + "__Pyx_PyNumber_Int": 1, + "__Pyx_PyIndex_AsSsize_t": 1, + "__Pyx_PyInt_FromSize_t": 1, + "__Pyx_PyInt_AsSize_t": 1, + "__pyx_PyFloat_AsDouble": 12, + "PyFloat_CheckExact": 1, + "PyFloat_AS_DOUBLE": 1, + "PyFloat_AsDouble": 2, + "__pyx_PyFloat_AsFloat": 1, + "__builtin_expect": 2, + "*__pyx_m": 1, + "*__pyx_b": 1, + "*__pyx_empty_tuple": 1, + "*__pyx_empty_bytes": 1, + "__pyx_lineno": 58, + "__pyx_clineno": 58, + "__pyx_cfilenm": 1, + "__FILE__": 4, + "*__pyx_filename": 7, + "CYTHON_CCOMPLEX": 12, + "_Complex_I": 3, + "": 1, + "": 1, + "__sun__": 1, + "fj": 1, + "*__pyx_f": 1, + "IS_UNSIGNED": 1, + "__Pyx_StructField_": 2, + "__PYX_BUF_FLAGS_PACKED_STRUCT": 1, + "__Pyx_StructField_*": 1, + "fields": 1, + "arraysize": 1, + "typegroup": 1, + "is_unsigned": 1, + "__Pyx_TypeInfo": 2, + "__Pyx_TypeInfo*": 2, + "offset": 1, + "__Pyx_StructField": 2, + "__Pyx_StructField*": 1, + "field": 1, + "parent_offset": 1, + "__Pyx_BufFmt_StackElem": 1, + "root": 1, + "__Pyx_BufFmt_StackElem*": 2, + "fmt_offset": 1, + "new_count": 1, + "enc_count": 1, + "struct_alignment": 1, + "is_complex": 1, + "enc_type": 1, + "new_packmode": 1, + "enc_packmode": 1, + "is_valid_array": 1, + "__Pyx_BufFmt_Context": 1, + "npy_int8": 1, + "__pyx_t_5numpy_int8_t": 1, + "npy_int16": 1, + "__pyx_t_5numpy_int16_t": 1, + "npy_int32": 1, + "__pyx_t_5numpy_int32_t": 4, + "npy_int64": 1, + "__pyx_t_5numpy_int64_t": 1, + "npy_uint8": 1, + "__pyx_t_5numpy_uint8_t": 1, + "npy_uint16": 1, + "__pyx_t_5numpy_uint16_t": 1, + "npy_uint32": 1, + "__pyx_t_5numpy_uint32_t": 1, + "npy_uint64": 1, + "__pyx_t_5numpy_uint64_t": 1, + "npy_float32": 1, + "__pyx_t_5numpy_float32_t": 1, + "npy_float64": 1, + "__pyx_t_5numpy_float64_t": 4, + "npy_long": 1, + "__pyx_t_5numpy_int_t": 1, + "npy_longlong": 2, + "__pyx_t_5numpy_long_t": 1, + "__pyx_t_5numpy_longlong_t": 1, + "npy_ulong": 1, + "__pyx_t_5numpy_uint_t": 1, + "npy_ulonglong": 2, + "__pyx_t_5numpy_ulong_t": 1, + "__pyx_t_5numpy_ulonglong_t": 1, + "npy_intp": 1, + "__pyx_t_5numpy_intp_t": 1, + "npy_uintp": 1, + "__pyx_t_5numpy_uintp_t": 1, + "npy_double": 2, + "__pyx_t_5numpy_float_t": 1, + "__pyx_t_5numpy_double_t": 1, + "npy_longdouble": 1, + "__pyx_t_5numpy_longdouble_t": 1, + "__pyx_t_7sklearn_5utils_13weight_vector_DOUBLE": 2, + "__pyx_t_7sklearn_5utils_13weight_vector_INTEGER": 1, + "__pyx_t_7sklearn_5utils_11seq_dataset_DOUBLE": 7, + "__pyx_t_7sklearn_5utils_11seq_dataset_INTEGER": 7, + "__pyx_t_7sklearn_12linear_model_8sgd_fast_DOUBLE": 4, + "__pyx_t_7sklearn_12linear_model_8sgd_fast_INTEGER": 3, + "std": 8, + "complex": 2, + "__pyx_t_float_complex": 27, + "_Complex": 2, + "real": 2, + "imag": 2, + "__pyx_t_double_complex": 27, + "__pyx_obj_7sklearn_12linear_model_8sgd_fast_LossFunction": 15, + "__pyx_obj_7sklearn_12linear_model_8sgd_fast_Regression": 11, + "__pyx_obj_7sklearn_12linear_model_8sgd_fast_Huber": 6, + "__pyx_obj_7sklearn_5utils_11seq_dataset_SequentialDataset": 5, + "__pyx_obj_7sklearn_12linear_model_8sgd_fast_EpsilonInsensitive": 6, + "__pyx_obj_7sklearn_12linear_model_8sgd_fast_Classification": 7, + "__pyx_obj_7sklearn_5utils_11seq_dataset_CSRDataset": 2, + "__pyx_obj_7sklearn_12linear_model_8sgd_fast_Log": 5, + "__pyx_obj_7sklearn_12linear_model_8sgd_fast_Hinge": 6, + "__pyx_obj_7sklearn_5utils_11seq_dataset_ArrayDataset": 2, + "__pyx_obj_7sklearn_12linear_model_8sgd_fast_SquaredHinge": 6, + "__pyx_obj_7sklearn_12linear_model_8sgd_fast_ModifiedHuber": 5, + "__pyx_obj_7sklearn_5utils_13weight_vector_WeightVector": 3, + "__pyx_obj_7sklearn_12linear_model_8sgd_fast_SquaredLoss": 5, + "__pyx_obj_7sklearn_12linear_model_8sgd_fast_SquaredEpsilonInsensitive": 6, + "npy_cfloat": 1, + "__pyx_t_5numpy_cfloat_t": 1, + "npy_cdouble": 2, + "__pyx_t_5numpy_cdouble_t": 1, + "npy_clongdouble": 1, + "__pyx_t_5numpy_clongdouble_t": 1, + "__pyx_t_5numpy_complex_t": 1, + "PyObject_HEAD": 3, + "__pyx_vtabstruct_7sklearn_12linear_model_8sgd_fast_LossFunction": 5, + "*__pyx_vtab": 3, + "__pyx_base": 18, + "__pyx_vtabstruct_7sklearn_5utils_11seq_dataset_SequentialDataset": 4, + "n_samples": 1, + "epsilon": 2, + "current_index": 2, + "stride": 2, + "*X_data_ptr": 2, + "*X_indptr_ptr": 1, + "*X_indices_ptr": 1, + "*Y_data_ptr": 2, + "PyArrayObject": 8, + "*feature_indices": 2, + "*feature_indices_ptr": 2, + "*index": 2, + "*index_data_ptr": 2, + "*sample_weight_data": 2, + "threshold": 2, + "n_features": 2, + "__pyx_vtabstruct_7sklearn_5utils_13weight_vector_WeightVector": 3, + "*w_data_ptr": 1, + "wscale": 1, + "sq_norm": 1, + "*__pyx_vtabptr_7sklearn_5utils_11seq_dataset_SequentialDataset": 1, + "__pyx_vtabstruct_7sklearn_5utils_11seq_dataset_ArrayDataset": 2, + "*__pyx_vtabptr_7sklearn_5utils_11seq_dataset_ArrayDataset": 1, + "__pyx_vtabstruct_7sklearn_5utils_11seq_dataset_CSRDataset": 2, + "*__pyx_vtabptr_7sklearn_5utils_11seq_dataset_CSRDataset": 1, + "__pyx_vtabstruct_7sklearn_12linear_model_8sgd_fast_EpsilonInsensitive": 2, + "__pyx_vtabstruct_7sklearn_12linear_model_8sgd_fast_Regression": 3, + "*__pyx_vtabptr_7sklearn_12linear_model_8sgd_fast_EpsilonInsensitive": 1, + "__pyx_vtabstruct_7sklearn_12linear_model_8sgd_fast_SquaredHinge": 2, + "*__pyx_vtabptr_7sklearn_12linear_model_8sgd_fast_SquaredHinge": 1, + "__pyx_vtabstruct_7sklearn_12linear_model_8sgd_fast_Huber": 2, + "*__pyx_vtabptr_7sklearn_12linear_model_8sgd_fast_Huber": 1, + "__pyx_vtabstruct_7sklearn_12linear_model_8sgd_fast_Hinge": 2, + "__pyx_vtabstruct_7sklearn_12linear_model_8sgd_fast_Classification": 1, + "*__pyx_vtabptr_7sklearn_12linear_model_8sgd_fast_Hinge": 1, + "*__pyx_vtabptr_7sklearn_5utils_13weight_vector_WeightVector": 1, + "CYTHON_REFNANNY": 3, + "__Pyx_RefNannyAPIStruct": 3, + "*__Pyx_RefNanny": 1, + "*__Pyx_RefNannyImportAPI": 1, + "*modname": 1, + "__Pyx_RefNannyDeclarations": 11, + "*__pyx_refnanny": 1, + "WITH_THREAD": 1, + "__Pyx_RefNannySetupContext": 12, + "acquire_gil": 4, + "PyGILState_STATE": 1, + "__pyx_gilstate_save": 2, + "PyGILState_Ensure": 1, + "__pyx_refnanny": 8, + "__Pyx_RefNanny": 8, + "SetupContext": 3, + "PyGILState_Release": 1, + "__Pyx_RefNannyFinishContext": 14, + "FinishContext": 1, + "__Pyx_INCREF": 6, + "INCREF": 1, + "__Pyx_DECREF": 20, + "DECREF": 1, + "__Pyx_GOTREF": 24, + "GOTREF": 1, + "__Pyx_GIVEREF": 9, + "GIVEREF": 1, + "__Pyx_XINCREF": 2, + "__Pyx_XDECREF": 20, + "__Pyx_XGOTREF": 2, + "__Pyx_XGIVEREF": 5, + "Py_DECREF": 2, + "Py_XINCREF": 1, + "Py_XDECREF": 1, + "__Pyx_CLEAR": 1, + "__Pyx_XCLEAR": 1, + "*__Pyx_GetName": 1, + "__Pyx_ErrRestore": 1, + "*type": 4, + "*tb": 2, + "__Pyx_ErrFetch": 1, + "**type": 1, + "**value": 1, + "**tb": 1, + "__Pyx_Raise": 4, + "*cause": 1, + "__Pyx_RaiseArgtupleInvalid": 7, + "func_name": 2, + "num_min": 1, + "num_max": 1, + "num_found": 1, + "__Pyx_RaiseDoubleKeywordsError": 1, + "kw_name": 1, + "__Pyx_ParseOptionalKeywords": 4, + "*kwds": 1, + "**argnames": 1, + "*kwds2": 1, + "*values": 1, + "num_pos_args": 1, + "function_name": 1, + "__Pyx_ArgTypeTest": 1, + "none_allowed": 1, + "__Pyx_GetBufferAndValidate": 1, + "Py_buffer*": 2, + "dtype": 1, + "nd": 1, + "cast": 1, + "__Pyx_SafeReleaseBuffer": 1, + "__Pyx_TypeTest": 1, + "__Pyx_RaiseBufferFallbackError": 1, + "*__Pyx_GetItemInt_Generic": 1, + "*r": 7, + "PyObject_GetItem": 1, + "__Pyx_GetItemInt_List": 1, + "to_py_func": 6, + "__Pyx_GetItemInt_List_Fast": 1, + "__Pyx_GetItemInt_Generic": 6, + "*__Pyx_GetItemInt_List_Fast": 1, + "PyList_GET_SIZE": 5, + "PyList_GET_ITEM": 3, + "PySequence_GetItem": 3, + "__Pyx_GetItemInt_Tuple": 1, + "__Pyx_GetItemInt_Tuple_Fast": 1, + "*__Pyx_GetItemInt_Tuple_Fast": 1, + "PyTuple_GET_SIZE": 14, + "PyTuple_GET_ITEM": 15, + "__Pyx_GetItemInt": 1, + "__Pyx_GetItemInt_Fast": 2, + "PyList_CheckExact": 1, + "PyTuple_CheckExact": 1, + "PySequenceMethods": 1, + "*m": 1, + "tp_as_sequence": 1, + "sq_item": 2, + "sq_length": 2, + "PySequence_Check": 1, + "__Pyx_RaiseTooManyValuesError": 1, + "expected": 2, + "__Pyx_RaiseNeedMoreValuesError": 1, + "__Pyx_RaiseNoneNotIterableError": 1, + "__Pyx_IterFinish": 1, + "__Pyx_IternextUnpackEndCheck": 1, + "*retval": 1, + "shape": 1, + "strides": 1, + "suboffsets": 1, + "__Pyx_Buf_DimInfo": 2, + "pybuffer": 1, + "__Pyx_Buffer": 2, + "*rcbuffer": 1, + "diminfo": 1, + "__Pyx_LocalBuf_ND": 1, + "__Pyx_GetBuffer": 2, + "*view": 2, + "__Pyx_ReleaseBuffer": 2, + "PyObject_GetBuffer": 1, + "PyBuffer_Release": 1, + "__Pyx_zeros": 1, + "__Pyx_minusones": 1, + "*__Pyx_Import": 1, + "*from_list": 1, + "__Pyx_RaiseImportError": 1, + "__Pyx_Print": 1, + "__pyx_print": 1, + "__pyx_print_kwargs": 1, + "__Pyx_PrintOne": 1, + "__Pyx_CREAL": 4, + ".real": 3, + "__Pyx_CIMAG": 4, + ".imag": 3, + "__real__": 1, + "__imag__": 1, + "__Pyx_SET_CREAL": 2, + "__Pyx_SET_CIMAG": 2, + "__pyx_t_float_complex_from_parts": 1, + "__Pyx_c_eqf": 2, + "__Pyx_c_sumf": 2, + "__Pyx_c_difff": 2, + "__Pyx_c_prodf": 2, + "__Pyx_c_quotf": 2, + "__Pyx_c_negf": 2, + "__Pyx_c_is_zerof": 3, + "__Pyx_c_conjf": 3, + "conj": 3, + "__Pyx_c_absf": 3, + "abs": 2, + "__Pyx_c_powf": 3, + "pow": 2, + "conjf": 1, + "cabsf": 1, + "cpowf": 1, + "__pyx_t_double_complex_from_parts": 1, + "__Pyx_c_eq": 2, + "__Pyx_c_sum": 2, + "__Pyx_c_diff": 2, + "__Pyx_c_prod": 2, + "__Pyx_c_quot": 2, + "__Pyx_c_neg": 2, + "__Pyx_c_is_zero": 3, + "__Pyx_c_conj": 3, + "__Pyx_c_abs": 3, + "__Pyx_c_pow": 3, + "cabs": 1, + "cpow": 1, + "__Pyx_PyInt_AsUnsignedChar": 1, + "__Pyx_PyInt_AsUnsignedShort": 1, + "__Pyx_PyInt_AsUnsignedInt": 1, + "__Pyx_PyInt_AsChar": 1, + "__Pyx_PyInt_AsShort": 1, + "signed": 5, + "__Pyx_PyInt_AsSignedChar": 1, + "__Pyx_PyInt_AsSignedShort": 1, + "__Pyx_PyInt_AsSignedInt": 1, + "__Pyx_PyInt_AsLongDouble": 1, + "__Pyx_PyInt_AsUnsignedLong": 1, + "__Pyx_PyInt_AsUnsignedLongLong": 1, + "__Pyx_PyInt_AsLong": 1, + "__Pyx_PyInt_AsLongLong": 1, + "__Pyx_PyInt_AsSignedLong": 1, + "__Pyx_PyInt_AsSignedLongLong": 1, + "__Pyx_WriteUnraisable": 4, + "clineno": 1, + "lineno": 1, + "*filename": 2, + "__Pyx_check_binary_version": 1, + "__Pyx_SetVtable": 1, + "*vtable": 1, + "__Pyx_PyIdentifier_FromString": 3, + "*__Pyx_ImportModule": 1, + "*__Pyx_ImportType": 1, + "*module_name": 1, + "*class_name": 1, + "__Pyx_GetVtable": 1, + "code_line": 4, + "PyCodeObject*": 2, + "code_object": 2, + "__Pyx_CodeObjectCacheEntry": 1, + "__Pyx_CodeObjectCache": 2, + "max_count": 1, + "__Pyx_CodeObjectCacheEntry*": 2, + "entries": 2, + "__pyx_code_cache": 1, + "__pyx_bisect_code_objects": 1, + "PyCodeObject": 1, + "*__pyx_find_code_object": 1, + "__pyx_insert_code_object": 1, + "__Pyx_AddTraceback": 7, + "*funcname": 1, + "c_line": 1, + "py_line": 1, + "__Pyx_InitStrings": 1, + "*__pyx_ptype_7cpython_4type_type": 1, + "*__pyx_ptype_5numpy_dtype": 1, + "*__pyx_ptype_5numpy_flatiter": 1, + "*__pyx_ptype_5numpy_broadcast": 1, + "*__pyx_ptype_5numpy_ndarray": 1, + "*__pyx_ptype_5numpy_ufunc": 1, + "*__pyx_f_5numpy__util_dtypestring": 1, + "PyArray_Descr": 1, + "*__pyx_ptype_7sklearn_5utils_13weight_vector_WeightVector": 1, + "*__pyx_ptype_7sklearn_5utils_11seq_dataset_SequentialDataset": 1, + "*__pyx_ptype_7sklearn_5utils_11seq_dataset_ArrayDataset": 1, + "*__pyx_ptype_7sklearn_5utils_11seq_dataset_CSRDataset": 1, + "*__pyx_ptype_7sklearn_12linear_model_8sgd_fast_LossFunction": 1, + "*__pyx_ptype_7sklearn_12linear_model_8sgd_fast_Regression": 1, + "*__pyx_ptype_7sklearn_12linear_model_8sgd_fast_Classification": 1, + "*__pyx_ptype_7sklearn_12linear_model_8sgd_fast_ModifiedHuber": 1, + "*__pyx_ptype_7sklearn_12linear_model_8sgd_fast_Hinge": 1, + "*__pyx_ptype_7sklearn_12linear_model_8sgd_fast_SquaredHinge": 1, + "*__pyx_ptype_7sklearn_12linear_model_8sgd_fast_Log": 1, + "*__pyx_ptype_7sklearn_12linear_model_8sgd_fast_SquaredLoss": 1, + "*__pyx_ptype_7sklearn_12linear_model_8sgd_fast_Huber": 1, + "*__pyx_ptype_7sklearn_12linear_model_8sgd_fast_EpsilonInsensitive": 1, + "*__pyx_ptype_7sklearn_12linear_model_8sgd_fast_SquaredEpsilonInsensitive": 1, + "__pyx_f_7sklearn_12linear_model_8sgd_fast_max": 1, + "__pyx_f_7sklearn_12linear_model_8sgd_fast_min": 1, + "__pyx_f_7sklearn_12linear_model_8sgd_fast_sqnorm": 1, + "__pyx_f_7sklearn_12linear_model_8sgd_fast_l1penalty": 1, + "__Pyx_TypeInfo_nn___pyx_t_7sklearn_12linear_model_8sgd_fast_DOUBLE": 1, + "__Pyx_MODULE_NAME": 1, + "__pyx_module_is_main_sklearn__linear_model__sgd_fast": 1, + "*__pyx_builtin_NotImplementedError": 1, + "*__pyx_builtin_range": 1, + "*__pyx_builtin_ValueError": 1, + "*__pyx_builtin_RuntimeError": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_12LossFunction_loss": 2, + "*__pyx_v_self": 52, + "__pyx_v_p": 46, + "__pyx_v_y": 46, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_12LossFunction_2dloss": 2, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_10Regression_loss": 2, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_10Regression_2dloss": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_14Classification_loss": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_14Classification_2dloss": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_13ModifiedHuber_loss": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_13ModifiedHuber_2dloss": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_13ModifiedHuber_4__reduce__": 1, + "__pyx_pf_7sklearn_12linear_model_8sgd_fast_5Hinge___init__": 1, + "__pyx_v_threshold": 2, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_5Hinge_2loss": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_5Hinge_4dloss": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_5Hinge_6__reduce__": 1, + "__pyx_pf_7sklearn_12linear_model_8sgd_fast_12SquaredHinge___init__": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_12SquaredHinge_2loss": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_12SquaredHinge_4dloss": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_12SquaredHinge_6__reduce__": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_3Log_loss": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_3Log_2dloss": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_3Log_4__reduce__": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_11SquaredLoss_loss": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_11SquaredLoss_2dloss": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_11SquaredLoss_4__reduce__": 1, + "__pyx_pf_7sklearn_12linear_model_8sgd_fast_5Huber___init__": 1, + "__pyx_v_c": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_5Huber_2loss": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_5Huber_4dloss": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_5Huber_6__reduce__": 1, + "__pyx_pf_7sklearn_12linear_model_8sgd_fast_18EpsilonInsensitive___init__": 1, + "__pyx_v_epsilon": 2, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_18EpsilonInsensitive_2loss": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_18EpsilonInsensitive_4dloss": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_18EpsilonInsensitive_6__reduce__": 1, + "__pyx_pf_7sklearn_12linear_model_8sgd_fast_25SquaredEpsilonInsensitive___init__": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_25SquaredEpsilonInsensitive_2loss": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_25SquaredEpsilonInsensitive_4dloss": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_25SquaredEpsilonInsensitive_6__reduce__": 1, + "*__pyx_pf_7sklearn_12linear_model_8sgd_fast_plain_sgd": 1, + "*__pyx_self": 1, + "*__pyx_v_weights": 1, + "__pyx_v_intercept": 1, + "*__pyx_v_loss": 1, + "__pyx_v_penalty_type": 1, + "__pyx_v_alpha": 1, + "__pyx_v_C": 1, + "__pyx_v_rho": 1, + "*__pyx_v_dataset": 1, + "__pyx_v_n_iter": 1, + "__pyx_v_fit_intercept": 1, + "__pyx_v_verbose": 1, + "__pyx_v_shuffle": 1, + "*__pyx_v_seed": 1, + "__pyx_v_weight_pos": 1, + "__pyx_v_weight_neg": 1, + "__pyx_v_learning_rate": 1, + "__pyx_v_eta0": 1, + "__pyx_v_power_t": 1, + "__pyx_v_t": 1, + "__pyx_v_intercept_decay": 1, + "__pyx_pf_5numpy_7ndarray___getbuffer__": 1, + "*__pyx_v_info": 2, + "__pyx_v_flags": 1, + "__pyx_pf_5numpy_7ndarray_2__releasebuffer__": 1, + "__pyx_k_1": 1, + "__pyx_k_2": 1, + "__pyx_k_3": 1, + "__pyx_k_4": 1, + "__pyx_k_6": 1, + "__pyx_k_8": 1, + "__pyx_k_10": 1, + "__pyx_k_12": 1, + "__pyx_k_13": 1, + "__pyx_k_16": 1, + "__pyx_k_20": 1, + "__pyx_k_21": 1, + "__pyx_k__B": 1, + "__pyx_k__C": 1, + "__pyx_k__H": 1, + "__pyx_k__I": 1, + "__pyx_k__L": 1, + "__pyx_k__O": 1, + "__pyx_k__Q": 1, + "__pyx_k__b": 1, + "__pyx_k__c": 1, + "__pyx_k__d": 1, + "__pyx_k__f": 1, + "__pyx_k__g": 1, + "__pyx_k__h": 1, + "__pyx_k__i": 1, + "__pyx_k__l": 1, + "__pyx_k__p": 1, + "__pyx_k__q": 1, + "__pyx_k__t": 1, + "__pyx_k__u": 1, + "__pyx_k__w": 1, + "__pyx_k__y": 1, + "__pyx_k__Zd": 1, + "__pyx_k__Zf": 1, + "__pyx_k__Zg": 1, + "__pyx_k__np": 1, + "__pyx_k__any": 1, + "__pyx_k__eta": 1, + "__pyx_k__rho": 1, + "__pyx_k__sys": 1, + "__pyx_k__eta0": 1, + "__pyx_k__loss": 1, + "__pyx_k__seed": 1, + "__pyx_k__time": 1, + "__pyx_k__xnnz": 1, + "__pyx_k__alpha": 1, + "__pyx_k__count": 1, + "__pyx_k__dloss": 1, + "__pyx_k__dtype": 1, + "__pyx_k__epoch": 1, + "__pyx_k__isinf": 1, + "__pyx_k__isnan": 1, + "__pyx_k__numpy": 1, + "__pyx_k__order": 1, + "__pyx_k__range": 1, + "__pyx_k__shape": 1, + "__pyx_k__zeros": 1, + "__pyx_k__n_iter": 1, + "__pyx_k__update": 1, + "__pyx_k__dataset": 1, + "__pyx_k__epsilon": 1, + "__pyx_k__float64": 1, + "__pyx_k__nonzero": 1, + "__pyx_k__power_t": 1, + "__pyx_k__shuffle": 1, + "__pyx_k__sumloss": 1, + "__pyx_k__t_start": 1, + "__pyx_k__verbose": 1, + "__pyx_k__weights": 1, + "__pyx_k____main__": 1, + "__pyx_k____test__": 1, + "__pyx_k__is_hinge": 1, + "__pyx_k__intercept": 1, + "__pyx_k__n_samples": 1, + "__pyx_k__plain_sgd": 1, + "__pyx_k__threshold": 1, + "__pyx_k__x_ind_ptr": 1, + "__pyx_k__ValueError": 1, + "__pyx_k__n_features": 1, + "__pyx_k__q_data_ptr": 1, + "__pyx_k__weight_neg": 1, + "__pyx_k__weight_pos": 1, + "__pyx_k__x_data_ptr": 1, + "__pyx_k__RuntimeError": 1, + "__pyx_k__class_weight": 1, + "__pyx_k__penalty_type": 1, + "__pyx_k__fit_intercept": 1, + "__pyx_k__learning_rate": 1, + "__pyx_k__sample_weight": 1, + "__pyx_k__intercept_decay": 1, + "__pyx_k__NotImplementedError": 1, + "*__pyx_kp_s_1": 1, + "*__pyx_kp_u_10": 1, + "*__pyx_kp_u_12": 1, + "*__pyx_kp_u_13": 1, + "*__pyx_kp_u_16": 1, + "*__pyx_kp_s_2": 1, + "*__pyx_kp_s_20": 1, + "*__pyx_n_s_21": 1, + "*__pyx_kp_s_3": 1, + "*__pyx_kp_s_4": 1, + "*__pyx_kp_u_6": 1, + "*__pyx_kp_u_8": 1, + "*__pyx_n_s__C": 1, + "*__pyx_n_s__NotImplementedError": 1, + "*__pyx_n_s__RuntimeError": 1, + "*__pyx_n_s__ValueError": 1, + "*__pyx_n_s____main__": 1, + "*__pyx_n_s____test__": 1, + "*__pyx_n_s__alpha": 1, + "*__pyx_n_s__any": 1, + "*__pyx_n_s__c": 1, + "*__pyx_n_s__class_weight": 1, + "*__pyx_n_s__count": 1, + "*__pyx_n_s__dataset": 1, + "*__pyx_n_s__dloss": 1, + "*__pyx_n_s__dtype": 1, + "*__pyx_n_s__epoch": 1, + "*__pyx_n_s__epsilon": 1, + "*__pyx_n_s__eta": 1, + "*__pyx_n_s__eta0": 1, + "*__pyx_n_s__fit_intercept": 1, + "*__pyx_n_s__float64": 1, + "*__pyx_n_s__i": 1, + "*__pyx_n_s__intercept": 1, + "*__pyx_n_s__intercept_decay": 1, + "*__pyx_n_s__is_hinge": 1, + "*__pyx_n_s__isinf": 1, + "*__pyx_n_s__isnan": 1, + "*__pyx_n_s__learning_rate": 1, + "*__pyx_n_s__loss": 1, + "*__pyx_n_s__n_features": 1, + "*__pyx_n_s__n_iter": 1, + "*__pyx_n_s__n_samples": 1, + "*__pyx_n_s__nonzero": 1, + "*__pyx_n_s__np": 1, + "*__pyx_n_s__numpy": 1, + "*__pyx_n_s__order": 1, + "*__pyx_n_s__p": 1, + "*__pyx_n_s__penalty_type": 1, + "*__pyx_n_s__plain_sgd": 1, + "*__pyx_n_s__power_t": 1, + "*__pyx_n_s__q": 1, + "*__pyx_n_s__q_data_ptr": 1, + "*__pyx_n_s__range": 1, + "*__pyx_n_s__rho": 1, + "*__pyx_n_s__sample_weight": 1, + "*__pyx_n_s__seed": 1, + "*__pyx_n_s__shape": 1, + "*__pyx_n_s__shuffle": 1, + "*__pyx_n_s__sumloss": 1, + "*__pyx_n_s__sys": 1, + "*__pyx_n_s__t": 1, + "*__pyx_n_s__t_start": 1, + "*__pyx_n_s__threshold": 1, + "*__pyx_n_s__time": 1, + "*__pyx_n_s__u": 1, + "*__pyx_n_s__update": 1, + "*__pyx_n_s__verbose": 1, + "*__pyx_n_s__w": 1, + "*__pyx_n_s__weight_neg": 1, + "*__pyx_n_s__weight_pos": 1, + "*__pyx_n_s__weights": 1, + "*__pyx_n_s__x_data_ptr": 1, + "*__pyx_n_s__x_ind_ptr": 1, + "*__pyx_n_s__xnnz": 1, + "*__pyx_n_s__y": 1, + "*__pyx_n_s__zeros": 1, + "*__pyx_int_15": 1, + "*__pyx_k_tuple_5": 1, + "*__pyx_k_tuple_7": 1, + "*__pyx_k_tuple_9": 1, + "*__pyx_k_tuple_11": 1, + "*__pyx_k_tuple_14": 1, + "*__pyx_k_tuple_15": 1, + "*__pyx_k_tuple_17": 1, + "*__pyx_k_tuple_18": 1, + "*__pyx_k_codeobj_19": 1, + "*__pyx_pw_7sklearn_12linear_model_8sgd_fast_12LossFunction_1loss": 3, + "*__pyx_args": 9, + "*__pyx_kwds": 9, + "__pyx_f_7sklearn_12linear_model_8sgd_fast_12LossFunction_loss": 1, + "__pyx_skip_dispatch": 6, + "__pyx_r": 39, + "*__pyx_t_1": 6, + "*__pyx_t_2": 3, + "*__pyx_t_3": 3, + "*__pyx_t_4": 3, + "__pyx_t_5": 12, + "__pyx_v_self": 15, + "tp_dictoffset": 3, + "__pyx_t_1": 69, + "PyObject_GetAttr": 3, + "__pyx_n_s__loss": 2, + "__pyx_filename": 51, + "__pyx_f": 42, + "__pyx_L1_error": 33, + "PyCFunction_Check": 3, + "PyCFunction_GET_FUNCTION": 3, + "PyCFunction": 3, + "__pyx_pw_7sklearn_12linear_model_8sgd_fast_12LossFunction_1loss": 1, + "__pyx_t_2": 21, + "PyFloat_FromDouble": 9, + "__pyx_t_3": 39, + "__pyx_t_4": 27, + "PyTuple_New": 3, + "PyTuple_SET_ITEM": 6, + "PyObject_Call": 6, + "PyErr_Occurred": 9, + "__pyx_L0": 18, + "__pyx_builtin_NotImplementedError": 3, + "__pyx_empty_tuple": 3, + "__pyx_doc_7sklearn_12linear_model_8sgd_fast_12LossFunction_loss": 1, + "*__pyx_r": 6, + "**__pyx_pyargnames": 3, + "__pyx_n_s__p": 6, + "__pyx_n_s__y": 6, + "values": 30, + "__pyx_kwds": 15, + "kw_args": 15, + "pos_args": 12, + "__pyx_args": 21, + "__pyx_L5_argtuple_error": 12, + "PyDict_Size": 3, + "PyDict_GetItem": 6, + "__pyx_L3_error": 18, + "__pyx_pyargnames": 3, + "__pyx_L4_argument_unpacking_done": 6, + "__pyx_pf_7sklearn_12linear_model_8sgd_fast_12LossFunction_loss": 1, + "__pyx_vtab": 2, + "loss": 1, + "*__pyx_pw_7sklearn_12linear_model_8sgd_fast_12LossFunction_3dloss": 3, + "__pyx_f_7sklearn_12linear_model_8sgd_fast_12LossFunction_dloss": 1, + "__pyx_n_s__dloss": 1, + "__pyx_pw_7sklearn_12linear_model_8sgd_fast_12LossFunction_3dloss": 1, + "__pyx_doc_7sklearn_12linear_model_8sgd_fast_12LossFunction_2dloss": 1, + "__pyx_pf_7sklearn_12linear_model_8sgd_fast_12LossFunction_2dloss": 1, + "dloss": 1, + "*__pyx_pw_7sklearn_12linear_model_8sgd_fast_10Regression_1loss": 3, + "__pyx_f_7sklearn_12linear_model_8sgd_fast_10Regression_loss": 1, + "__pyx_pw_7sklearn_12linear_model_8sgd_fast_10Regression_1loss": 1, + "__pyx_pf_7sklearn_12linear_model_8sgd_fast_10Regression_loss": 1, + "__pyx_base.__pyx_vtab": 1, + "__pyx_base.loss": 1, "__wglew_h__": 2, "__WGLEW_H__": 1, "__wglext_h_": 2, @@ -5275,7 +6253,6 @@ "PFNWGLDELETEBUFFERREGIONARBPROC": 2, "hRegion": 3, "PFNWGLRESTOREBUFFERREGIONARBPROC": 2, - "y": 2, "width": 3, "height": 3, "xSrc": 1, @@ -6209,17 +7186,17 @@ "C++": { "class": 32, "Bar": 2, - "{": 298, + "{": 467, "protected": 4, - "char": 34, - "*name": 2, - ";": 848, + "char": 121, + "*name": 6, + ";": 2134, "public": 24, - "void": 65, + "void": 105, "hello": 2, - "(": 894, - ")": 896, - "}": 300, + "(": 2183, + ")": 2184, + "}": 466, "foo": 2, "cudaArray*": 1, "cu_array": 4, @@ -6233,24 +7210,24 @@ "cudaCreateChannelDesc": 1, "": 1, "cudaMallocArray": 1, - "&": 87, + "&": 98, "width": 5, "height": 5, "cudaMemcpyToArray": 1, "image": 1, "width*height*sizeof": 1, - "float": 2, + "float": 9, "cudaMemcpyHostToDevice": 1, "tex.addressMode": 2, - "[": 32, - "]": 32, + "[": 192, + "]": 192, "cudaAddressModeClamp": 2, "tex.filterMode": 1, "cudaFilterModePoint": 1, "tex.normalized": 1, "false": 40, "//": 230, - "do": 2, + "do": 5, "not": 2, "normalize": 1, "coordinates": 1, @@ -6258,60 +7235,60 @@ "dim3": 2, "blockDim": 2, "gridDim": 2, - "+": 40, + "+": 51, "blockDim.x": 2, - "-": 120, - "/": 9, + "-": 200, + "/": 11, "blockDim.y": 2, "kernel": 2, "<<": 16, - "<": 27, + "<": 51, "d_data": 1, "cudaUnbindTexture": 1, "//end": 1, "__global__": 1, "float*": 1, "odata": 2, - "int": 80, - "unsigned": 16, - "x": 19, + "int": 138, + "unsigned": 22, + "x": 48, "blockIdx.x*blockDim.x": 1, "threadIdx.x": 1, - "y": 4, + "y": 16, "blockIdx.y*blockDim.y": 1, "threadIdx.y": 1, - "if": 138, - "&&": 13, + "if": 263, + "&&": 24, "c": 52, "tex2D": 1, "y*width": 1, - "#include": 79, + "#include": 89, "": 1, "": 1, "": 2, - "static": 57, + "static": 254, "Env": 13, "*env_instance": 1, - "*": 13, - "NULL": 49, + "*": 159, + "NULL": 101, "*Env": 1, "instance": 4, "env_instance": 3, "new": 2, - "return": 114, + "return": 123, "QObject": 2, "QCoreApplication": 1, "parse": 3, - "const": 103, + "const": 114, "**envp": 1, "**env": 1, "**": 2, "QString": 20, "envvar": 2, - "name": 3, - "value": 5, + "name": 6, + "value": 9, "indexOfEquals": 5, - "for": 16, + "for": 18, "env": 3, "envp": 4, "*env": 1, @@ -6323,14 +7300,14 @@ "QVariantMap": 3, "asVariantMap": 2, "m_map": 2, - "#ifndef": 8, + "#ifndef": 20, "ENV_H": 3, - "#define": 9, + "#define": 187, "": 1, "Q_OBJECT": 1, "*instance": 1, "private": 10, - "#endif": 19, + "#endif": 77, "GDSDBREADER_H": 3, "": 1, "GDS_DIR": 1, @@ -6368,7 +7345,7 @@ "bool": 92, "noFatherRoot": 1, "Used": 1, - "to": 74, + "to": 75, "tell": 1, "this": 4, "node": 1, @@ -6376,17 +7353,17 @@ "root": 1, "so": 1, "hasn": 1, - "t": 8, + "t": 13, "in": 9, "argument": 1, "list": 2, - "of": 44, + "of": 45, "an": 2, "operator": 9, "overload.": 1, "A": 1, "friend": 7, - "stream": 4, + "stream": 5, "myclass.label": 2, "myclass.depth": 2, "myclass.userIndex": 2, @@ -6409,7 +7386,7 @@ "": 1, "using": 1, "namespace": 14, - "std": 18, + "std": 26, "main": 2, "cout": 1, "endl": 1, @@ -6432,7 +7409,7 @@ "EC_KEY_get0_group": 2, "ctx": 26, "BN_CTX_new": 2, - "goto": 24, + "goto": 155, "err": 26, "pub_key": 6, "EC_POINT_new": 4, @@ -6462,7 +7439,7 @@ "*Q": 1, "*rr": 1, "*zero": 1, - "n": 7, + "n": 28, "i": 47, "BN_CTX_start": 1, "order": 8, @@ -6472,7 +7449,7 @@ "BN_mul_word": 1, "BN_add": 1, "ecsig": 3, - "r": 9, + "r": 36, "field": 3, "EC_GROUP_get_curve_GFp": 1, "BN_cmp": 1, @@ -6495,7 +7472,7 @@ "BN_mod_inverse": 1, "sor": 3, "BN_mod_mul": 2, - "s": 5, + "s": 9, "eor": 3, "BN_CTX_end": 1, "CKey": 26, @@ -6511,13 +7488,13 @@ "throw": 4, "key_error": 6, "fSet": 7, - "b": 15, + "b": 57, "EC_KEY_dup": 1, "b.pkey": 2, "b.fSet": 2, "EC_KEY_copy": 1, "hash": 20, - "sizeof": 6, + "sizeof": 11, "vchSig": 18, "nSize": 2, "vchSig.clear": 2, @@ -6525,7 +7502,7 @@ "Shrink": 1, "fit": 1, "actual": 1, - "size": 1, + "size": 3, "SignCompact": 2, "uint256": 10, "vector": 14, @@ -6533,7 +7510,7 @@ "fOk": 3, "*sig": 2, "ECDSA_do_sign": 1, - "char*": 7, + "char*": 10, "sig": 11, "nBitsR": 3, "BN_num_bits": 2, @@ -6543,7 +7520,7 @@ "keyRec": 5, "1": 2, "GetPubKey": 5, - "break": 30, + "break": 32, "BN_bn2bin": 2, "/8": 2, "ECDSA_SIG_free": 2, @@ -6569,7 +7546,7 @@ "key2.GetPubKey": 1, "BITCOIN_KEY_H": 2, "": 1, - "": 1, + "": 2, "": 1, "definition": 1, "runtime_error": 2, @@ -6582,7 +7559,7 @@ "CPubKey": 11, "vchPubKey": 6, "vchPubKeyIn": 2, - "a": 34, + "a": 82, "a.vchPubKey": 3, "b.vchPubKey": 3, "IMPLEMENT_SERIALIZE": 1, @@ -6594,10 +7571,10 @@ "vchPubKey.begin": 1, "vchPubKey.end": 1, "vchPubKey.size": 3, - "||": 8, + "||": 17, "IsCompressed": 2, "Raw": 1, - "typedef": 5, + "typedef": 38, "secure_allocator": 2, "CPrivKey": 3, "EC_KEY*": 1, @@ -6611,13 +7588,13 @@ "GetPrivKey": 1, "SetPubKey": 1, "Sign": 1, - "#ifdef": 7, + "#ifdef": 16, "Q_OS_LINUX": 2, "": 1, - "#if": 4, + "#if": 42, "QT_VERSION": 1, "QT_VERSION_CHECK": 1, - "#error": 2, + "#error": 3, "Something": 1, "wrong": 1, "with": 3, @@ -6655,7 +7632,7 @@ "phantom.returnValue": 1, "QSCICOMMAND_H": 2, "__APPLE__": 4, - "extern": 2, + "extern": 4, "": 1, "": 2, "": 1, @@ -6728,7 +7705,7 @@ "document.": 8, "ScrollToStart": 1, "SCI_SCROLLTOSTART": 1, - "end": 15, + "end": 18, "ScrollToEnd": 1, "SCI_SCROLLTOEND": 1, "vertically": 1, @@ -7047,7 +8024,7 @@ "alter": 1, "layout": 1, "adding": 2, - "headers": 2, + "headers": 3, "footers": 2, "example.": 1, "Constructs": 1, @@ -7159,7 +8136,7 @@ "overflow": 1, "digits": 3, "c0_": 64, - "d": 6, + "d": 8, "HexValue": 2, "j": 4, "PushBack": 8, @@ -7196,12 +8173,12 @@ "next_.location.beg_pos": 3, "next_.location.end_pos": 4, "current_.token": 4, - "inline": 12, + "inline": 13, "IsByteOrderMark": 2, "xFEFF": 1, "xFFFE": 1, "start_position": 2, - "while": 6, + "while": 10, "IsWhiteSpace": 2, "IsLineTerminator": 6, "SkipSingleLineComment": 6, @@ -7216,7 +8193,7 @@ "case": 32, "ScanString": 3, "LTE": 1, - "else": 32, + "else": 42, "ASSIGN_SHL": 1, "SHL": 1, "GTE": 1, @@ -7281,7 +8258,7 @@ "X": 2, "E": 3, "l": 1, - "p": 1, + "p": 5, "w": 1, "keyword": 1, "Unescaped": 1, @@ -7299,7 +8276,7 @@ "CLASSIC_MODE": 2, "STRICT_MODE": 2, "EXTENDED_MODE": 2, - "|": 2, + "|": 7, "detect": 1, "x16": 1, "x36.": 1, @@ -7388,14 +8365,14 @@ "": 1, "dst": 2, "Scanner*": 2, - "self": 2, + "self": 5, "scanner_": 5, "complete_": 4, "StartLiteral": 2, "DropLiteral": 2, "Complete": 1, "TerminateLiteral": 2, - "struct": 2, + "struct": 7, "beg_pos": 5, "end_pos": 4, "kNoOctalLocation": 1, @@ -7463,7 +8440,7 @@ "QTemporaryFile": 1, "showUsage": 1, "QtMsgType": 1, - "type": 1, + "type": 6, "dump_path": 1, "minidump_id": 1, "void*": 1, @@ -7588,7 +8565,7 @@ "IncrementCallDepth": 1, "DecrementCallDepth": 1, "union": 1, - "double": 2, + "double": 23, "double_value": 1, "uint64_t": 2, "uint64_t_value": 1, @@ -7624,11 +8601,11 @@ "ExternalReference": 1, "CallOnce": 1, "V8_V8_H_": 3, - "defined": 6, + "defined": 21, "GOOGLE3": 2, "DEBUG": 3, "NDEBUG": 4, - "#undef": 1, + "#undef": 2, "both": 1, "set": 1, "Deserializer": 1, @@ -7642,7 +8619,727 @@ "kUndefinedValue": 1, "EqualityKind": 1, "kStrictEquality": 1, - "kNonStrictEquality": 1 + "kNonStrictEquality": 1, + "PY_SSIZE_T_CLEAN": 1, + "Py_PYTHON_H": 1, + "Python": 1, + "needed": 1, + "compile": 1, + "C": 1, + "extensions": 1, + "please": 1, + "install": 1, + "development": 1, + "version": 1, + "Python.": 1, + "#else": 24, + "": 1, + "offsetof": 2, + "member": 2, + "size_t": 3, + "type*": 1, + "WIN32": 2, + "MS_WINDOWS": 2, + "__stdcall": 2, + "__cdecl": 2, + "__fastcall": 2, + "DL_IMPORT": 2, + "DL_EXPORT": 2, + "PY_LONG_LONG": 5, + "LONG_LONG": 1, + "PY_VERSION_HEX": 9, + "METH_COEXIST": 1, + "PyDict_CheckExact": 1, + "op": 6, + "Py_TYPE": 4, + "PyDict_Type": 1, + "PyDict_Contains": 1, + "o": 20, + "PySequence_Contains": 1, + "Py_ssize_t": 17, + "PY_SSIZE_T_MAX": 1, + "INT_MAX": 1, + "PY_SSIZE_T_MIN": 1, + "INT_MIN": 1, + "PY_FORMAT_SIZE_T": 1, + "PyInt_FromSsize_t": 2, + "z": 46, + "PyInt_FromLong": 13, + "PyInt_AsSsize_t": 2, + "PyInt_AsLong": 2, + "PyNumber_Index": 1, + "PyNumber_Int": 1, + "PyIndex_Check": 1, + "PyNumber_Check": 1, + "PyErr_WarnEx": 1, + "category": 2, + "message": 2, + "stacklevel": 1, + "PyErr_Warn": 1, + "Py_REFCNT": 1, + "ob": 6, + "PyObject*": 16, + "ob_refcnt": 1, + "ob_type": 7, + "Py_SIZE": 1, + "PyVarObject*": 1, + "ob_size": 1, + "PyVarObject_HEAD_INIT": 1, + "PyObject_HEAD_INIT": 1, + "PyType_Modified": 1, + "*buf": 1, + "PyObject": 221, + "*obj": 2, + "len": 1, + "itemsize": 2, + "readonly": 2, + "ndim": 2, + "*format": 1, + "*shape": 1, + "*strides": 1, + "*suboffsets": 1, + "*internal": 1, + "Py_buffer": 5, + "PyBUF_SIMPLE": 1, + "PyBUF_WRITABLE": 1, + "PyBUF_FORMAT": 1, + "PyBUF_ND": 2, + "PyBUF_STRIDES": 5, + "PyBUF_C_CONTIGUOUS": 3, + "PyBUF_F_CONTIGUOUS": 3, + "PyBUF_ANY_CONTIGUOUS": 1, + "PyBUF_INDIRECT": 1, + "PY_MAJOR_VERSION": 10, + "__Pyx_BUILTIN_MODULE_NAME": 2, + "Py_TPFLAGS_CHECKTYPES": 1, + "Py_TPFLAGS_HAVE_INDEX": 1, + "Py_TPFLAGS_HAVE_NEWBUFFER": 1, + "PyBaseString_Type": 1, + "PyUnicode_Type": 2, + "PyStringObject": 2, + "PyUnicodeObject": 1, + "PyString_Type": 2, + "PyString_Check": 2, + "PyUnicode_Check": 1, + "PyString_CheckExact": 2, + "PyUnicode_CheckExact": 1, + "PyBytesObject": 1, + "PyBytes_Type": 1, + "PyBytes_Check": 1, + "PyBytes_CheckExact": 1, + "PyBytes_FromString": 2, + "PyString_FromString": 1, + "PyBytes_FromStringAndSize": 1, + "PyString_FromStringAndSize": 1, + "PyBytes_FromFormat": 1, + "PyString_FromFormat": 1, + "PyBytes_DecodeEscape": 1, + "PyString_DecodeEscape": 1, + "PyBytes_AsString": 2, + "PyString_AsString": 1, + "PyBytes_AsStringAndSize": 1, + "PyString_AsStringAndSize": 1, + "PyBytes_Size": 1, + "PyString_Size": 1, + "PyBytes_AS_STRING": 1, + "PyString_AS_STRING": 1, + "PyBytes_GET_SIZE": 1, + "PyString_GET_SIZE": 1, + "PyBytes_Repr": 1, + "PyString_Repr": 1, + "PyBytes_Concat": 1, + "PyString_Concat": 1, + "PyBytes_ConcatAndDel": 1, + "PyString_ConcatAndDel": 1, + "PySet_Check": 1, + "obj": 42, + "PyObject_TypeCheck": 3, + "PySet_Type": 2, + "PyFrozenSet_Check": 1, + "PyFrozenSet_Type": 1, + "PySet_CheckExact": 2, + "__Pyx_TypeCheck": 1, + "PyTypeObject": 2, + "PyIntObject": 1, + "PyLongObject": 2, + "PyInt_Type": 1, + "PyLong_Type": 1, + "PyInt_Check": 1, + "PyLong_Check": 1, + "PyInt_CheckExact": 1, + "PyLong_CheckExact": 1, + "PyInt_FromString": 1, + "PyLong_FromString": 1, + "PyInt_FromUnicode": 1, + "PyLong_FromUnicode": 1, + "PyLong_FromLong": 1, + "PyInt_FromSize_t": 1, + "PyLong_FromSize_t": 1, + "PyLong_FromSsize_t": 1, + "PyLong_AsLong": 1, + "PyInt_AS_LONG": 1, + "PyLong_AS_LONG": 1, + "PyLong_AsSsize_t": 1, + "PyInt_AsUnsignedLongMask": 1, + "PyLong_AsUnsignedLongMask": 1, + "PyInt_AsUnsignedLongLongMask": 1, + "PyLong_AsUnsignedLongLongMask": 1, + "PyBoolObject": 1, + "__Pyx_PyNumber_Divide": 2, + "PyNumber_TrueDivide": 1, + "__Pyx_PyNumber_InPlaceDivide": 2, + "PyNumber_InPlaceTrueDivide": 1, + "PyNumber_Divide": 1, + "PyNumber_InPlaceDivide": 1, + "__Pyx_PySequence_GetSlice": 2, + "PySequence_GetSlice": 2, + "__Pyx_PySequence_SetSlice": 2, + "PySequence_SetSlice": 2, + "__Pyx_PySequence_DelSlice": 2, + "PySequence_DelSlice": 2, + "unlikely": 69, + "PyErr_SetString": 4, + "PyExc_SystemError": 3, + "likely": 15, + "tp_as_mapping": 3, + "PyErr_Format": 4, + "PyExc_TypeError": 5, + "tp_name": 4, + "PyMethod_New": 2, + "func": 3, + "klass": 1, + "PyInstanceMethod_New": 1, + "__Pyx_GetAttrString": 2, + "PyObject_GetAttrString": 3, + "__Pyx_SetAttrString": 2, + "PyObject_SetAttrString": 2, + "__Pyx_DelAttrString": 2, + "PyObject_DelAttrString": 2, + "__Pyx_NAMESTR": 3, + "__Pyx_DOCSTR": 3, + "__cplusplus": 10, + "__PYX_EXTERN_C": 2, + "_USE_MATH_DEFINES": 1, + "": 1, + "__PYX_HAVE_API__wrapper_inner": 1, + "PYREX_WITHOUT_ASSERTIONS": 1, + "CYTHON_WITHOUT_ASSERTIONS": 1, + "CYTHON_INLINE": 68, + "__GNUC__": 5, + "__inline__": 1, + "#elif": 3, + "_MSC_VER": 1, + "__inline": 1, + "__STDC_VERSION__": 2, + "L": 1, + "CYTHON_UNUSED": 7, + "**p": 1, + "*s": 1, + "long": 5, + "encoding": 1, + "is_unicode": 1, + "is_str": 1, + "intern": 1, + "__Pyx_StringTabEntry": 1, + "__Pyx_PyBytes_FromUString": 1, + "__Pyx_PyBytes_AsUString": 1, + "__Pyx_PyBool_FromLong": 1, + "Py_INCREF": 3, + "Py_True": 2, + "Py_False": 2, + "__Pyx_PyObject_IsTrue": 8, + "__Pyx_PyNumber_Int": 1, + "__Pyx_PyIndex_AsSsize_t": 1, + "__Pyx_PyInt_FromSize_t": 1, + "__Pyx_PyInt_AsSize_t": 1, + "__pyx_PyFloat_AsDouble": 3, + "PyFloat_CheckExact": 1, + "PyFloat_AS_DOUBLE": 1, + "PyFloat_AsDouble": 1, + "__GNUC_MINOR__": 1, + "__builtin_expect": 2, + "*__pyx_m": 1, + "*__pyx_b": 1, + "*__pyx_empty_tuple": 1, + "*__pyx_empty_bytes": 1, + "__pyx_lineno": 80, + "__pyx_clineno": 80, + "__pyx_cfilenm": 1, + "__FILE__": 2, + "*__pyx_filename": 1, + "CYTHON_CCOMPLEX": 12, + "_Complex_I": 3, + "": 1, + "": 1, + "__sun__": 1, + "fj": 1, + "*__pyx_f": 1, + "npy_int8": 1, + "__pyx_t_5numpy_int8_t": 1, + "npy_int16": 1, + "__pyx_t_5numpy_int16_t": 1, + "npy_int32": 1, + "__pyx_t_5numpy_int32_t": 1, + "npy_int64": 1, + "__pyx_t_5numpy_int64_t": 1, + "npy_uint8": 1, + "__pyx_t_5numpy_uint8_t": 1, + "npy_uint16": 1, + "__pyx_t_5numpy_uint16_t": 1, + "npy_uint32": 1, + "__pyx_t_5numpy_uint32_t": 1, + "npy_uint64": 1, + "__pyx_t_5numpy_uint64_t": 1, + "npy_float32": 1, + "__pyx_t_5numpy_float32_t": 1, + "npy_float64": 1, + "__pyx_t_5numpy_float64_t": 1, + "npy_long": 1, + "__pyx_t_5numpy_int_t": 1, + "npy_longlong": 1, + "__pyx_t_5numpy_long_t": 1, + "npy_intp": 10, + "__pyx_t_5numpy_intp_t": 1, + "npy_uintp": 1, + "__pyx_t_5numpy_uintp_t": 1, + "npy_ulong": 1, + "__pyx_t_5numpy_uint_t": 1, + "npy_ulonglong": 1, + "__pyx_t_5numpy_ulong_t": 1, + "npy_double": 2, + "__pyx_t_5numpy_float_t": 1, + "__pyx_t_5numpy_double_t": 1, + "npy_longdouble": 1, + "__pyx_t_5numpy_longdouble_t": 1, + "complex": 2, + "__pyx_t_float_complex": 27, + "_Complex": 2, + "real": 2, + "imag": 2, + "__pyx_t_double_complex": 27, + "npy_cfloat": 1, + "__pyx_t_5numpy_cfloat_t": 1, + "npy_cdouble": 2, + "__pyx_t_5numpy_cdouble_t": 1, + "npy_clongdouble": 1, + "__pyx_t_5numpy_clongdouble_t": 1, + "__pyx_t_5numpy_complex_t": 1, + "CYTHON_REFNANNY": 3, + "__Pyx_RefNannyAPIStruct": 4, + "*__Pyx_RefNanny": 1, + "__Pyx_RefNannyImportAPI": 1, + "*modname": 1, + "*m": 1, + "*p": 1, + "*r": 1, + "m": 4, + "PyImport_ImportModule": 1, + "modname": 1, + "PyLong_AsVoidPtr": 1, + "Py_XDECREF": 3, + "__Pyx_RefNannySetupContext": 13, + "*__pyx_refnanny": 1, + "__Pyx_RefNanny": 6, + "SetupContext": 1, + "__LINE__": 84, + "__Pyx_RefNannyFinishContext": 12, + "FinishContext": 1, + "__pyx_refnanny": 5, + "__Pyx_INCREF": 36, + "INCREF": 1, + "__Pyx_DECREF": 66, + "DECREF": 1, + "__Pyx_GOTREF": 60, + "GOTREF": 1, + "__Pyx_GIVEREF": 10, + "GIVEREF": 1, + "__Pyx_XDECREF": 26, + "Py_DECREF": 1, + "__Pyx_XGIVEREF": 7, + "__Pyx_XGOTREF": 1, + "__Pyx_TypeTest": 4, + "*type": 3, + "*__Pyx_GetName": 1, + "*dict": 1, + "__Pyx_ErrRestore": 1, + "*value": 2, + "*tb": 2, + "__Pyx_ErrFetch": 1, + "**type": 1, + "**value": 1, + "**tb": 1, + "__Pyx_Raise": 8, + "__Pyx_RaiseNoneNotIterableError": 1, + "__Pyx_RaiseNeedMoreValuesError": 1, + "index": 2, + "__Pyx_RaiseTooManyValuesError": 1, + "expected": 1, + "__Pyx_UnpackTupleError": 2, + "*__Pyx_Import": 1, + "*from_list": 1, + "__Pyx_Print": 1, + "__pyx_print": 1, + "__pyx_print_kwargs": 1, + "__Pyx_PrintOne": 4, + "*o": 1, + "*__Pyx_PyInt_to_py_Py_intptr_t": 1, + "Py_intptr_t": 1, + "__Pyx_CREAL": 4, + ".real": 3, + "__Pyx_CIMAG": 4, + ".imag": 3, + "__real__": 1, + "__imag__": 1, + "_WIN32": 1, + "__Pyx_SET_CREAL": 2, + "__Pyx_SET_CIMAG": 2, + "__pyx_t_float_complex_from_parts": 1, + "__Pyx_c_eqf": 2, + "__Pyx_c_sumf": 2, + "__Pyx_c_difff": 2, + "__Pyx_c_prodf": 2, + "__Pyx_c_quotf": 2, + "__Pyx_c_negf": 2, + "__Pyx_c_is_zerof": 3, + "__Pyx_c_conjf": 3, + "conj": 3, + "__Pyx_c_absf": 3, + "abs": 2, + "__Pyx_c_powf": 3, + "pow": 2, + "conjf": 1, + "cabsf": 1, + "cpowf": 1, + "__pyx_t_double_complex_from_parts": 1, + "__Pyx_c_eq": 2, + "__Pyx_c_sum": 2, + "__Pyx_c_diff": 2, + "__Pyx_c_prod": 2, + "__Pyx_c_quot": 2, + "__Pyx_c_neg": 2, + "__Pyx_c_is_zero": 3, + "__Pyx_c_conj": 3, + "__Pyx_c_abs": 3, + "__Pyx_c_pow": 3, + "cabs": 1, + "cpow": 1, + "__Pyx_PyInt_AsUnsignedChar": 1, + "short": 3, + "__Pyx_PyInt_AsUnsignedShort": 1, + "__Pyx_PyInt_AsUnsignedInt": 1, + "__Pyx_PyInt_AsChar": 1, + "__Pyx_PyInt_AsShort": 1, + "__Pyx_PyInt_AsInt": 1, + "signed": 5, + "__Pyx_PyInt_AsSignedChar": 1, + "__Pyx_PyInt_AsSignedShort": 1, + "__Pyx_PyInt_AsSignedInt": 1, + "__Pyx_PyInt_AsLongDouble": 1, + "__Pyx_PyInt_AsUnsignedLong": 1, + "__Pyx_PyInt_AsUnsignedLongLong": 1, + "__Pyx_PyInt_AsLong": 1, + "__Pyx_PyInt_AsLongLong": 1, + "__Pyx_PyInt_AsSignedLong": 1, + "__Pyx_PyInt_AsSignedLongLong": 1, + "__Pyx_WriteUnraisable": 3, + "__Pyx_ExportFunction": 1, + "*__pyx_f_5numpy_PyArray_MultiIterNew2": 2, + "*__pyx_f_5numpy_PyArray_MultiIterNew3": 2, + "*__pyx_f_5numpy_PyArray_MultiIterNew4": 2, + "*__pyx_f_5numpy_PyArray_MultiIterNew5": 2, + "*__pyx_f_5numpy__util_dtypestring": 2, + "PyArray_Descr": 6, + "__pyx_f_5numpy_set_array_base": 1, + "PyArrayObject": 19, + "*__pyx_f_5numpy_get_array_base": 1, + "inner_work_1d": 2, + "inner_work_2d": 2, + "__Pyx_MODULE_NAME": 1, + "__pyx_module_is_main_wrapper_inner": 1, + "*__pyx_builtin_ValueError": 1, + "*__pyx_builtin_range": 1, + "*__pyx_builtin_RuntimeError": 1, + "__pyx_k_1": 1, + "__pyx_k_2": 1, + "__pyx_k_3": 1, + "__pyx_k_5": 1, + "__pyx_k_7": 1, + "__pyx_k_9": 1, + "__pyx_k_11": 1, + "__pyx_k_12": 1, + "__pyx_k_15": 1, + "__pyx_k__B": 2, + "__pyx_k__H": 2, + "__pyx_k__I": 2, + "__pyx_k__L": 2, + "__pyx_k__O": 2, + "__pyx_k__Q": 2, + "__pyx_k__b": 2, + "__pyx_k__d": 2, + "__pyx_k__f": 2, + "__pyx_k__g": 2, + "__pyx_k__h": 2, + "__pyx_k__i": 2, + "__pyx_k__l": 2, + "__pyx_k__q": 2, + "__pyx_k__Zd": 2, + "__pyx_k__Zf": 2, + "__pyx_k__Zg": 2, + "__pyx_k__np": 1, + "__pyx_k__buf": 1, + "__pyx_k__obj": 1, + "__pyx_k__base": 1, + "__pyx_k__ndim": 1, + "__pyx_k__ones": 1, + "__pyx_k__descr": 1, + "__pyx_k__names": 1, + "__pyx_k__numpy": 1, + "__pyx_k__range": 1, + "__pyx_k__shape": 1, + "__pyx_k__fields": 1, + "__pyx_k__format": 1, + "__pyx_k__strides": 1, + "__pyx_k____main__": 1, + "__pyx_k____test__": 1, + "__pyx_k__itemsize": 1, + "__pyx_k__readonly": 1, + "__pyx_k__type_num": 1, + "__pyx_k__byteorder": 1, + "__pyx_k__ValueError": 1, + "__pyx_k__suboffsets": 1, + "__pyx_k__work_module": 1, + "__pyx_k__RuntimeError": 1, + "__pyx_k__pure_py_test": 1, + "__pyx_k__wrapper_inner": 1, + "__pyx_k__do_awesome_work": 1, + "*__pyx_kp_s_1": 1, + "*__pyx_kp_u_11": 1, + "*__pyx_kp_u_12": 1, + "*__pyx_kp_u_15": 1, + "*__pyx_kp_s_2": 1, + "*__pyx_kp_s_3": 1, + "*__pyx_kp_u_5": 1, + "*__pyx_kp_u_7": 1, + "*__pyx_kp_u_9": 1, + "*__pyx_n_s__RuntimeError": 1, + "*__pyx_n_s__ValueError": 1, + "*__pyx_n_s____main__": 1, + "*__pyx_n_s____test__": 1, + "*__pyx_n_s__base": 1, + "*__pyx_n_s__buf": 1, + "*__pyx_n_s__byteorder": 1, + "*__pyx_n_s__descr": 1, + "*__pyx_n_s__do_awesome_work": 1, + "*__pyx_n_s__fields": 1, + "*__pyx_n_s__format": 1, + "*__pyx_n_s__itemsize": 1, + "*__pyx_n_s__names": 1, + "*__pyx_n_s__ndim": 1, + "*__pyx_n_s__np": 1, + "*__pyx_n_s__numpy": 1, + "*__pyx_n_s__obj": 1, + "*__pyx_n_s__ones": 1, + "*__pyx_n_s__pure_py_test": 1, + "*__pyx_n_s__range": 1, + "*__pyx_n_s__readonly": 1, + "*__pyx_n_s__shape": 1, + "*__pyx_n_s__strides": 1, + "*__pyx_n_s__suboffsets": 1, + "*__pyx_n_s__type_num": 1, + "*__pyx_n_s__work_module": 1, + "*__pyx_n_s__wrapper_inner": 1, + "*__pyx_int_5": 1, + "*__pyx_int_15": 1, + "*__pyx_k_tuple_4": 1, + "*__pyx_k_tuple_6": 1, + "*__pyx_k_tuple_8": 1, + "*__pyx_k_tuple_10": 1, + "*__pyx_k_tuple_13": 1, + "*__pyx_k_tuple_14": 1, + "*__pyx_k_tuple_16": 1, + "__pyx_v_num_x": 4, + "*__pyx_v_data_ptr": 2, + "*__pyx_v_answer_ptr": 2, + "__pyx_v_nd": 6, + "*__pyx_v_dims": 2, + "__pyx_v_typenum": 6, + "*__pyx_v_data_np": 2, + "__pyx_v_sum": 6, + "__pyx_t_1": 154, + "*__pyx_t_2": 4, + "*__pyx_t_3": 4, + "*__pyx_t_4": 3, + "__pyx_t_5": 75, + "__pyx_kp_s_1": 1, + "__pyx_filename": 79, + "__pyx_f": 79, + "__pyx_L1_error": 88, + "__pyx_v_dims": 4, + "NPY_DOUBLE": 3, + "__pyx_t_2": 120, + "PyArray_SimpleNewFromData": 2, + "__pyx_v_data_ptr": 2, + "Py_None": 38, + "__pyx_ptype_5numpy_ndarray": 2, + "__pyx_v_data_np": 10, + "__Pyx_GetName": 4, + "__pyx_m": 4, + "__pyx_n_s__work_module": 3, + "__pyx_t_3": 113, + "PyObject_GetAttr": 4, + "__pyx_n_s__do_awesome_work": 3, + "PyTuple_New": 4, + "PyTuple_SET_ITEM": 4, + "__pyx_t_4": 35, + "PyObject_Call": 11, + "PyErr_Occurred": 2, + "__pyx_v_answer_ptr": 2, + "__pyx_L0": 24, + "__pyx_v_num_y": 2, + "__pyx_kp_s_2": 1, + "*__pyx_pf_13wrapper_inner_pure_py_test": 2, + "*__pyx_self": 2, + "*unused": 2, + "PyMethodDef": 1, + "__pyx_mdef_13wrapper_inner_pure_py_test": 1, + "PyCFunction": 1, + "__pyx_pf_13wrapper_inner_pure_py_test": 1, + "METH_NOARGS": 1, + "*__pyx_v_data": 1, + "*__pyx_r": 7, + "*__pyx_t_1": 8, + "__pyx_self": 2, + "__pyx_v_data": 7, + "__pyx_kp_s_3": 1, + "__pyx_n_s__np": 1, + "__pyx_n_s__ones": 1, + "__pyx_k_tuple_4": 1, + "__pyx_r": 39, + "__Pyx_AddTraceback": 7, + "__pyx_pf_5numpy_7ndarray___getbuffer__": 2, + "*__pyx_v_self": 4, + "*__pyx_v_info": 4, + "__pyx_v_flags": 4, + "__pyx_v_copy_shape": 5, + "__pyx_v_i": 6, + "__pyx_v_ndim": 6, + "__pyx_v_endian_detector": 6, + "__pyx_v_little_endian": 8, + "__pyx_v_t": 29, + "*__pyx_v_f": 2, + "*__pyx_v_descr": 2, + "__pyx_v_offset": 9, + "__pyx_v_hasfields": 4, + "__pyx_t_6": 40, + "__pyx_t_7": 9, + "*__pyx_t_8": 1, + "*__pyx_t_9": 1, + "__pyx_v_info": 33, + "__pyx_v_self": 16, + "PyArray_NDIM": 1, + "__pyx_L5": 6, + "PyArray_CHKFLAGS": 2, + "NPY_C_CONTIGUOUS": 1, + "__pyx_builtin_ValueError": 5, + "__pyx_k_tuple_6": 1, + "__pyx_L6": 6, + "NPY_F_CONTIGUOUS": 1, + "__pyx_k_tuple_8": 1, + "__pyx_L7": 2, + "buf": 1, + "PyArray_DATA": 1, + "strides": 5, + "malloc": 2, + "shape": 3, + "PyArray_STRIDES": 2, + "PyArray_DIMS": 2, + "__pyx_L8": 2, + "suboffsets": 1, + "PyArray_ITEMSIZE": 1, + "PyArray_ISWRITEABLE": 1, + "__pyx_v_f": 31, + "descr": 2, + "__pyx_v_descr": 10, + "PyDataType_HASFIELDS": 2, + "__pyx_L11": 7, + "type_num": 2, + "byteorder": 4, + "__pyx_k_tuple_10": 1, + "__pyx_L13": 2, + "NPY_BYTE": 2, + "__pyx_L14": 18, + "NPY_UBYTE": 2, + "NPY_SHORT": 2, + "NPY_USHORT": 2, + "NPY_INT": 2, + "NPY_UINT": 2, + "NPY_LONG": 1, + "NPY_ULONG": 1, + "NPY_LONGLONG": 1, + "NPY_ULONGLONG": 1, + "NPY_FLOAT": 1, + "NPY_LONGDOUBLE": 1, + "NPY_CFLOAT": 1, + "NPY_CDOUBLE": 1, + "NPY_CLONGDOUBLE": 1, + "NPY_OBJECT": 1, + "__pyx_t_8": 16, + "PyNumber_Remainder": 1, + "__pyx_kp_u_11": 1, + "format": 6, + "__pyx_L12": 2, + "__pyx_t_9": 7, + "__pyx_f_5numpy__util_dtypestring": 1, + "__pyx_L2": 2, + "__pyx_pf_5numpy_7ndarray_1__releasebuffer__": 2, + "PyArray_HASFIELDS": 1, + "free": 2, + "*__pyx_f_5numpy_PyArray_MultiIterNew1": 1, + "*__pyx_v_a": 5, + "PyArray_MultiIterNew": 5, + "__pyx_v_a": 5, + "*__pyx_v_b": 4, + "__pyx_v_b": 4, + "*__pyx_v_c": 3, + "__pyx_v_c": 3, + "*__pyx_v_d": 2, + "__pyx_v_d": 2, + "*__pyx_v_e": 1, + "__pyx_v_e": 1, + "*__pyx_v_end": 1, + "*__pyx_v_offset": 1, + "*__pyx_v_child": 1, + "*__pyx_v_fields": 1, + "*__pyx_v_childname": 1, + "*__pyx_v_new_offset": 1, + "*__pyx_v_t": 1, + "*__pyx_t_5": 1, + "__pyx_t_10": 7, + "*__pyx_t_11": 1, + "__pyx_v_child": 8, + "__pyx_v_fields": 7, + "__pyx_v_childname": 4, + "__pyx_v_new_offset": 5, + "names": 2, + "PyTuple_GET_SIZE": 2, + "PyTuple_GET_ITEM": 3, + "PyObject_GetItem": 1, + "fields": 1, + "PyTuple_CheckExact": 1, + "tuple": 3, + "__pyx_ptype_5numpy_dtype": 1, + "__pyx_v_end": 2, + "PyNumber_Subtract": 2, + "PyObject_RichCompare": 8, + "__pyx_int_15": 1, + "Py_LT": 2, + "__pyx_builtin_RuntimeError": 2, + "__pyx_k_tuple_13": 1, + "__pyx_k_tuple_14": 1, + "elsize": 1, + "__pyx_k_tuple_16": 1, + "__pyx_L10": 2, + "Py_EQ": 6 }, "Ceylon": { "doc": 2, @@ -22871,6 +24568,756 @@ "indexPathWithIndexes": 1, "indexAtPosition": 2 }, + "Objective-C++": { + "#include": 26, + "": 1, + "": 1, + "#if": 10, + "(": 612, + "defined": 1, + "OBJC_API_VERSION": 2, + ")": 610, + "&&": 12, + "static": 16, + "inline": 3, + "IMP": 4, + "method_setImplementation": 2, + "Method": 2, + "m": 3, + "i": 29, + "{": 151, + "oi": 2, + "-": 175, + "method_imp": 2, + ";": 494, + "return": 149, + "}": 148, + "#endif": 19, + "namespace": 1, + "WebCore": 1, + "ENABLE": 10, + "DRAG_SUPPORT": 7, + "const": 16, + "double": 1, + "EventHandler": 30, + "TextDragDelay": 1, + "RetainPtr": 4, + "": 4, + "&": 21, + "currentNSEventSlot": 6, + "DEFINE_STATIC_LOCAL": 1, + "event": 30, + "NSEvent": 21, + "*EventHandler": 2, + "currentNSEvent": 13, + ".get": 1, + "class": 14, + "CurrentEventScope": 14, + "WTF_MAKE_NONCOPYABLE": 1, + "public": 1, + "*": 34, + "private": 1, + "m_savedCurrentEvent": 3, + "#ifndef": 3, + "NDEBUG": 2, + "m_event": 3, + "*event": 11, + "ASSERT": 13, + "bool": 26, + "wheelEvent": 5, + "Page*": 7, + "page": 33, + "m_frame": 24, + "if": 104, + "false": 40, + "scope": 6, + "PlatformWheelEvent": 2, + "chrome": 8, + "platformPageClient": 4, + "handleWheelEvent": 2, + "wheelEvent.isAccepted": 1, + "PassRefPtr": 2, + "": 1, + "currentKeyboardEvent": 1, + "[": 268, + "NSApp": 5, + "currentEvent": 2, + "]": 266, + "switch": 4, + "type": 10, + "case": 25, + "NSKeyDown": 4, + "PlatformKeyboardEvent": 6, + "platformEvent": 2, + "platformEvent.disambiguateKeyDownEvent": 1, + "RawKeyDown": 1, + "KeyboardEvent": 2, + "create": 3, + "document": 6, + "defaultView": 2, + "NSKeyUp": 3, + "default": 3, + "keyEvent": 2, + "BEGIN_BLOCK_OBJC_EXCEPTIONS": 13, + "||": 18, + "END_BLOCK_OBJC_EXCEPTIONS": 13, + "void": 18, + "focusDocumentView": 1, + "FrameView*": 7, + "frameView": 4, + "view": 28, + "NSView": 14, + "*documentView": 1, + "documentView": 2, + "focusNSView": 1, + "focusController": 1, + "setFocusedFrame": 1, + "passWidgetMouseDownEventToWidget": 3, + "MouseEventWithHitTestResults": 7, + "RenderObject*": 2, + "target": 6, + "targetNode": 3, + "renderer": 7, + "isWidget": 2, + "passMouseDownEventToWidget": 3, + "toRenderWidget": 3, + "widget": 18, + "RenderWidget*": 1, + "renderWidget": 2, + "lastEventIsMouseUp": 2, + "*currentEventAfterHandlingMouseDown": 1, + "currentEventAfterHandlingMouseDown": 3, + "NSLeftMouseUp": 3, + "timestamp": 8, + "Widget*": 3, + "pWidget": 2, + "RefPtr": 1, + "": 1, + "LOG_ERROR": 1, + "true": 29, + "platformWidget": 6, + "*nodeView": 1, + "nodeView": 9, + "superview": 5, + "*view": 4, + "hitTest": 2, + "convertPoint": 2, + "locationInWindow": 4, + "fromView": 3, + "nil": 25, + "client": 3, + "firstResponder": 1, + "clickCount": 8, + "<=>": 1, + "1": 1, + "acceptsFirstResponder": 1, + "needsPanelToBecomeKey": 1, + "makeFirstResponder": 1, + "wasDeferringLoading": 3, + "defersLoading": 1, + "setDefersLoading": 2, + "m_sendingEventToSubview": 24, + "*outerView": 1, + "getOuterView": 1, + "beforeMouseDown": 1, + "outerView": 2, + "widget.get": 2, + "mouseDown": 2, + "afterMouseDown": 1, + "m_mouseDownView": 5, + "m_mouseDownWasInSubframe": 7, + "m_mousePressed": 2, + "findViewInSubviews": 3, + "*superview": 1, + "*target": 1, + "NSEnumerator": 1, + "*e": 1, + "subviews": 1, + "objectEnumerator": 1, + "*subview": 1, + "while": 4, + "subview": 3, + "e": 1, + "nextObject": 1, + "mouseDownViewIfStillGood": 3, + "*mouseDownView": 1, + "mouseDownView": 3, + "topFrameView": 3, + "*topView": 1, + "topView": 2, + "eventLoopHandleMouseDragged": 1, + "mouseDragged": 2, + "//": 7, + "eventLoopHandleMouseUp": 1, + "mouseUp": 2, + "passSubframeEventToSubframe": 4, + "Frame*": 5, + "subframe": 13, + "HitTestResult*": 2, + "hoveredNode": 5, + "NSLeftMouseDragged": 1, + "NSOtherMouseDragged": 1, + "NSRightMouseDragged": 1, + "dragController": 1, + "didInitiateDrag": 1, + "NSMouseMoved": 2, + "eventHandler": 6, + "handleMouseMoveEvent": 3, + "currentPlatformMouseEvent": 8, + "NSLeftMouseDown": 3, + "Node*": 1, + "node": 3, + "isFrameView": 2, + "handleMouseReleaseEvent": 3, + "originalNSScrollViewScrollWheel": 4, + "_nsScrollViewScrollWheelShouldRetainSelf": 3, + "selfRetainingNSScrollViewScrollWheel": 3, + "NSScrollView": 2, + "SEL": 2, + "nsScrollViewScrollWheelShouldRetainSelf": 2, + "isMainThread": 3, + "setNSScrollViewScrollWheelShouldRetainSelf": 3, + "shouldRetain": 2, + "method": 2, + "class_getInstanceMethod": 1, + "objc_getRequiredClass": 1, + "@selector": 4, + "scrollWheel": 2, + "reinterpret_cast": 1, + "": 1, + "*self": 1, + "selector": 2, + "shouldRetainSelf": 3, + "self": 70, + "retain": 1, + "release": 1, + "passWheelEventToWidget": 1, + "NSView*": 1, + "static_cast": 1, + "": 1, + "frame": 3, + "NSScrollWheel": 1, + "v": 6, + "loader": 1, + "resetMultipleFormSubmissionProtection": 1, + "handleMousePressEvent": 2, + "int": 36, + "%": 2, + "handleMouseDoubleClickEvent": 1, + "else": 11, + "sendFakeEventsAfterWidgetTracking": 1, + "*initiatingEvent": 1, + "eventType": 5, + "initiatingEvent": 22, + "*fakeEvent": 1, + "fakeEvent": 6, + "mouseEventWithType": 2, + "location": 3, + "modifierFlags": 6, + "windowNumber": 6, + "context": 6, + "eventNumber": 3, + "pressure": 3, + "postEvent": 3, + "atStart": 3, + "YES": 6, + "keyEventWithType": 1, + "characters": 3, + "charactersIgnoringModifiers": 2, + "isARepeat": 2, + "keyCode": 2, + "window": 1, + "convertScreenToBase": 1, + "mouseLocation": 1, + "mouseMoved": 2, + "frameHasPlatformWidget": 4, + "passMousePressEventToSubframe": 1, + "mev": 6, + "mev.event": 3, + "passMouseMoveEventToSubframe": 1, + "m_mouseDownMayStartDrag": 1, + "passMouseReleaseEventToSubframe": 1, + "PlatformMouseEvent": 5, + "*windowView": 1, + "windowView": 2, + "CONTEXT_MENUS": 2, + "sendContextMenuEvent": 2, + "eventMayStartDrag": 2, + "eventActivatedView": 1, + "m_activationEventNumber": 1, + "event.eventNumber": 1, + "": 1, + "createDraggingClipboard": 1, + "NSPasteboard": 2, + "*pasteboard": 1, + "pasteboardWithName": 1, + "NSDragPboard": 1, + "pasteboard": 2, + "declareTypes": 1, + "NSArray": 3, + "array": 2, + "owner": 15, + "ClipboardMac": 1, + "Clipboard": 1, + "DragAndDrop": 1, + "ClipboardWritable": 1, + "tabsToAllFormControls": 1, + "KeyboardEvent*": 1, + "KeyboardUIMode": 1, + "keyboardUIMode": 5, + "handlingOptionTab": 4, + "isKeyboardOptionTab": 1, + "KeyboardAccessTabsToLinks": 2, + "KeyboardAccessFull": 1, + "needsKeyboardEventDisambiguationQuirks": 2, + "Document*": 1, + "applicationIsSafari": 1, + "url": 2, + ".protocolIs": 2, + "Settings*": 1, + "settings": 5, + "DASHBOARD_SUPPORT": 1, + "usesDashboardBackwardCompatibilityMode": 1, + "unsigned": 2, + "accessKeyModifiers": 1, + "AXObjectCache": 1, + "accessibilityEnhancedUserInterfaceEnabled": 1, + "CtrlKey": 2, + "|": 3, + "AltKey": 1, + "#import": 3, + "": 1, + "": 1, + "#ifdef": 6, + "OODEBUG": 1, + "#define": 1, + "OODEBUG_SQL": 4, + "OOOODatabase": 1, + "OODB": 1, + "NSString": 25, + "*kOOObject": 1, + "@": 28, + "*kOOInsert": 1, + "*kOOUpdate": 1, + "*kOOExecSQL": 1, + "#pragma": 5, + "mark": 5, + "OORecord": 3, + "abstract": 1, + "superclass": 1, + "for": 14, + "records": 1, + "@implementation": 7, + "+": 55, + "id": 19, + "record": 18, + "OO_AUTORETURNS": 2, + "OO_AUTORELEASE": 3, + "alloc": 11, + "init": 4, + "insert": 7, + "*record": 4, + "insertWithParent": 1, + "parent": 10, + "OODatabase": 26, + "sharedInstance": 37, + "copyJoinKeysFrom": 1, + "to": 6, + "delete": 4, + "update": 4, + "indate": 4, + "upsert": 4, + "commit": 6, + "rollback": 5, + "setNilValueForKey": 1, + "key": 2, + "OOReference": 2, + "": 1, + "zeroForNull": 4, + "NSNumber": 4, + "numberWithInt": 1, + "setValue": 1, + "forKey": 1, + "OOArray": 16, + "": 14, + "select": 21, + "intoClass": 11, + "joinFrom": 10, + "cOOString": 15, + "sql": 21, + "selectRecordsRelatedTo": 1, + "importFrom": 1, + "OOFile": 4, + "file": 2, + "delimiter": 4, + "delim": 4, + "rows": 2, + "OOMetaData": 21, + "import": 1, + "file.string": 1, + "insertArray": 3, + "BOOL": 11, + "exportTo": 1, + "file.save": 1, + "export": 1, + "bindToView": 1, + "OOView": 2, + "delegate": 4, + "bindRecord": 1, + "toView": 1, + "updateFromView": 1, + "updateRecord": 1, + "description": 6, + "*metaData": 14, + "metaDataForClass": 3, + "hack": 1, + "required": 2, + "where": 1, + "contains": 1, + "a": 9, + "field": 1, + "avoid": 1, + "recursion": 1, + "OOStringArray": 6, + "ivars": 5, + "<<": 2, + "metaData": 26, + "encode": 3, + "dictionaryWithValuesForKeys": 3, + "@end": 14, + "OOAdaptor": 6, + "all": 3, + "methods": 1, + "by": 1, + "objsql": 1, + "access": 2, + "database": 12, + "@interface": 6, + "NSObject": 1, + "sqlite3": 1, + "*db": 1, + "sqlite3_stmt": 1, + "*stmt": 1, + "struct": 5, + "_str_link": 5, + "*next": 2, + "char": 9, + "str": 7, + "*strs": 1, + "OO_UNSAFE": 1, + "*owner": 3, + "initPath": 5, + "path": 9, + "prepare": 4, + "bindCols": 5, + "cOOStringArray": 3, + "columns": 7, + "values": 29, + "cOOValueDictionary": 2, + "startingAt": 5, + "pno": 13, + "bindNulls": 8, + "bindResultsIntoInstancesOfClass": 4, + "Class": 9, + "recordClass": 16, + "sqlite_int64": 2, + "lastInsertRowID": 2, + "NSData": 3, + "OOExtras": 9, + "initWithDescription": 1, + "is": 2, + "the": 5, + "low": 1, + "level": 1, + "interface": 1, + "particular": 2, + "": 1, + "sharedInstanceForPath": 2, + "OODocument": 1, + ".path": 1, + "OONil": 1, + "OO_RELEASE": 6, + "exec": 10, + "fmt": 9, + "...": 3, + "va_list": 3, + "argp": 12, + "va_start": 3, + "*sql": 5, + "initWithFormat": 3, + "arguments": 3, + "va_end": 3, + "objects": 4, + "deleteArray": 2, + "object": 13, + "commitTransaction": 3, + "super": 3, + "adaptor": 1, + "registerSubclassesOf": 1, + "recordSuperClass": 2, + "numClasses": 5, + "objc_getClassList": 2, + "NULL": 4, + "*classes": 2, + "malloc": 2, + "sizeof": 2, + "": 1, + "viewClasses": 4, + "classNames": 4, + "scan": 1, + "registered": 2, + "classes": 12, + "relevant": 1, + "subclasses": 1, + "c": 14, + "<": 5, + "superClass": 5, + "class_getName": 4, + "class_getSuperclass": 1, + "respondsToSelector": 2, + "ooTableSql": 1, + "tableMetaDataForClass": 8, + "break": 6, + "delay": 1, + "creation": 1, + "views": 1, + "until": 1, + "after": 1, + "tables": 1, + "": 1, + "in": 9, + "order": 1, + "free": 3, + "Register": 1, + "list": 1, + "of": 2, + "before": 1, + "using": 2, + "them": 2, + "so": 2, + "can": 1, + "determine": 1, + "relationships": 1, + "between": 1, + "registerTableClassesNamed": 1, + "tableClass": 2, + "NSBundle": 1, + "mainBundle": 1, + "classNamed": 1, + "Send": 1, + "any": 2, + "SQL": 1, + "Sql": 1, + "format": 1, + "string": 1, + "escape": 1, + "Any": 1, + "results": 3, + "returned": 1, + "are": 1, + "placed": 1, + "as": 1, + "an": 1, + "dictionary": 1, + "results.": 1, + "*/": 1, + "errcode": 12, + "OOString": 6, + "stringForSql": 2, + "*aColumnName": 1, + "**results": 1, + "allKeys": 1, + "objectAtIndex": 1, + "OOValueDictionary": 5, + "joinValues": 4, + "sharedColumns": 5, + "*parentMetaData": 1, + "parentMetaData": 2, + "naturalJoinTo": 1, + "joinableColumns": 1, + "whereClauseFor": 2, + "qualifyNulls": 2, + "NO": 3, + "ooOrderBy": 2, + "OOFormat": 5, + "NSLog": 4, + "*joinValues": 1, + "*adaptor": 7, + "": 1, + "tablesRelatedByNaturalJoinFrom": 1, + "tablesWithNaturalJoin": 5, + "**tablesWithNaturalJoin": 1, + "*childMetaData": 1, + "tableMetaDataByClassName": 3, + "prepareSql": 1, + "toTable": 1, + "childMetaData": 1, + "OODictionary": 2, + "": 1, + "tmpResults": 1, + "kOOExecSQL": 1, + "*exec": 2, + "OOWarn": 9, + "errmsg": 5, + "continue": 3, + "OORef": 2, + "": 1, + "*values": 3, + "kOOObject": 3, + "isInsert": 4, + "kOOInsert": 1, + "isUpdate": 5, + "kOOUpdate": 2, + "newValues": 3, + "changedCols": 4, + "*name": 4, + "*newValues": 1, + "name": 9, + "isEqual": 1, + "tableName": 4, + "columns/": 1, + "nchanged": 4, + "*object": 1, + "lastSQL": 4, + "**changedCols": 1, + "quote": 2, + "commaQuote": 2, + "": 1, + "commited": 2, + "updateCount": 2, + "transaction": 2, + "updated": 2, + "NSMutableDictionary": 1, + "*d": 1, + "*transaction": 1, + "d": 2, + "": 1, + "OO_ARC": 1, + "boxed": 1, + "valueForKey": 1, + "pointerValue": 1, + "setValuesForKeysWithDictionary": 2, + "decode": 2, + "count": 1, + "className": 3, + "createTableSQL": 2, + "*idx": 1, + "indexes": 1, + "idx": 2, + "implements": 1, + ".directory": 1, + ".mkdir": 1, + "sqlite3_open": 1, + "db": 8, + "SQLITE_OK": 6, + "*path": 1, + "sqlite3_prepare_v2": 1, + "stmt": 20, + "sqlite3_errmsg": 3, + "bindValue": 2, + "value": 26, + "asParameter": 2, + "OODEBUG_BIND": 1, + "OONull": 3, + "sqlite3_bind_null": 1, + "OOSQL_THREAD_SAFE_BUT_USES_MORE_MEMORY": 1, + "isKindOfClass": 3, + "sqlite3_bind_text": 2, + "UTF8String": 1, + "SQLITE_STATIC": 3, + "#else": 1, + "len": 4, + "lengthOfBytesUsingEncoding": 1, + "NSUTF8StringEncoding": 3, + "*str": 2, + "next": 3, + "strs": 6, + "getCString": 1, + "maxLength": 1, + "encoding": 2, + "sqlite3_bind_blob": 1, + "bytes": 5, + "length": 4, + "*type": 1, + "objCType": 1, + "sqlite3_bind_int": 1, + "intValue": 3, + "sqlite3_bind_int64": 1, + "longLongValue": 1, + "sqlite3_bind_double": 1, + "doubleValue": 1, + "*columns": 1, + "valuesForNextRow": 2, + "ncols": 2, + "sqlite3_column_count": 1, + "sqlite3_column_name": 1, + "sqlite3_column_type": 2, + "SQLITE_NULL": 1, + "SQLITE_INTEGER": 1, + "initWithLongLong": 1, + "sqlite3_column_int64": 1, + "SQLITE_FLOAT": 1, + "initWithDouble": 1, + "sqlite3_column_double": 1, + "SQLITE_TEXT": 1, + "*bytes": 2, + "sqlite3_column_text": 1, + "NSMutableString": 1, + "initWithBytes": 2, + "sqlite3_column_bytes": 2, + "SQLITE_BLOB": 1, + "sqlite3_column_blob": 1, + "out": 4, + "awakeFromDB": 4, + "instancesRespondToSelector": 1, + "sqlite3_step": 1, + "SQLITE_ROW": 1, + "SQLITE_DONE": 1, + "out.alloc": 1, + "sqlite3_changes": 1, + "sqlite3_finalize": 1, + "sqlite3_last_insert_rowid": 1, + "dealloc": 1, + "sqlite3_close": 1, + "OO_DEALLOC": 1, + "instances": 1, + "represent": 1, + "table": 1, + "and": 2, + "it": 2, + "s": 2, + "l": 1, + "C": 1, + "S": 1, + "I": 1, + "L": 1, + "q": 1, + "Q": 1, + "f": 1, + "_": 2, + "tag": 1, + "A": 2, + "<'>": 1, + "iptr": 4, + "*optr": 1, + "unhex": 2, + "*iptr": 1, + "*16": 1, + "hex": 1, + "initWithBytesNoCopy": 1, + "optr": 1, + "freeWhenDone": 1, + "stringValue": 4, + "charValue": 1, + "shortValue": 1, + "OOReplace": 2, + "reformat": 4, + "NSDictionary": 2, + "__IPHONE_OS_VERSION_MIN_REQUIRED": 1, + "UISwitch": 2, + "text": 1, + "self.on": 1 + }, "OCaml": { "{": 11, "shared": 1, @@ -31871,8 +34318,8 @@ "Arduino": 20, "AutoHotkey": 3, "Awk": 544, - "C": 49038, - "C++": 9713, + "C": 58732, + "C++": 19321, "Ceylon": 50, "CoffeeScript": 2955, "Coq": 18259, @@ -31913,6 +34360,7 @@ "Nimrod": 1, "Nu": 4, "Objective-C": 26518, + "Objective-C++": 6021, "OCaml": 382, "Omgrofl": 57, "Opa": 28, @@ -31962,8 +34410,8 @@ "Arduino": 1, "AutoHotkey": 1, "Awk": 1, - "C": 23, - "C++": 17, + "C": 24, + "C++": 18, "Ceylon": 1, "CoffeeScript": 9, "Coq": 12, @@ -32004,6 +34452,7 @@ "Nimrod": 1, "Nu": 1, "Objective-C": 19, + "Objective-C++": 2, "OCaml": 2, "Omgrofl": 1, "Opa": 2, @@ -32046,5 +34495,5 @@ "Xtend": 2, "YAML": 1 }, - "md5": "dc0cf0d799df2c7ec258ad4d2b067f57" + "md5": "298988718bc3bc2603e5a62fa8b652b7" } \ No newline at end of file