Changeset: 1d42be3e6f49 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1d42be3e6f49
Modified Files:
clients/R/MonetDB.R/R/dbi.R
monetdb5/extras/rapi/rapi.c
Branch: Jul2015
Log Message:
Removed RAPI for Windows and R Client fix for new DBI
diffs (135 lines):
diff --git a/clients/R/MonetDB.R/R/dbi.R b/clients/R/MonetDB.R/R/dbi.R
--- a/clients/R/MonetDB.R/R/dbi.R
+++ b/clients/R/MonetDB.R/R/dbi.R
@@ -479,9 +479,13 @@ setMethod("dbFetch", signature(res="Mone
if (!dbIsValid(res)) {
stop("Cannot fetch results from closed response.")
}
-
+
# okay, so we arrive here with the tuples from the first result in
res@env$data as a list
info <- res@env$info
+ # apparently, one should be able to fetch results sets from ddl ops
+ if (info$type == Q_UPDATE) {
+ return(data.frame())
+ }
if (res@env$delivered < 0) {
res@env$delivered <- 0
}
diff --git a/monetdb5/extras/rapi/rapi.c b/monetdb5/extras/rapi/rapi.c
--- a/monetdb5/extras/rapi/rapi.c
+++ b/monetdb5/extras/rapi/rapi.c
@@ -221,112 +221,9 @@ static char *RAPIinitialize(void) {
return NULL;
}
#else
-/* Completely different Windows initialization */
-/* Gratefully inspired by the JRI code by Simon Urbanek (LGPL) */
-
-/* R likes this spelling better */
-#define Win32
-
-#define NONAMELESSUNION
-#include <windows.h>
-#include <winreg.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-/* before we include RStatup.h we need to work around a bug in it for Win64:
- it defines wrong R_size_t if R_SIZE_T_DEFINED is not set */
-#if defined(WIN64) && ! defined(R_SIZE_T_DEFINED)
-#include <stdint.h>
-#define R_size_t uintptr_t
-#define R_SIZE_T_DEFINED 1
-#endif
-
-#include "R_ext/RStartup.h"
-#include "Rversion.h"
-
-#ifndef _WIN64
-/* according to fixed/config.h Windows has uintptr_t, my windows hasn't */
-#if !defined(HAVE_UINTPTR_T) && !defined(uintptr_t) && !defined(_STDINT_H)
-//typedef unsigned uintptr_t;
-// TODO: win64? how do we know?
-#endif
-#endif
-extern __declspec(dllimport) uintptr_t R_CStackLimit; /* C stack limit */
-extern __declspec(dllimport) uintptr_t R_CStackStart; /* Initial stack address
*/
-
-/* for signal-handling code */
-/* #include "psignal.h" - it's not included, so just get SIGBREAK */
-#define SIGBREAK 21 /* to readers pgrp upon background tty read */
-
-#define S_IRWXU 0000700
-
-/* one way to allow user interrupts: called in ProcessEvents */
-#ifdef _MSC_VER
-__declspec(dllimport) int UserBreak;
-#else
-#ifndef WIN64
-#define UserBreak (*_imp__UserBreak)
-#endif
-extern int UserBreak;
-#endif
-
-extern char *getDLLVersion(), *getRUser(), *get_R_HOME();
-extern void R_DefParams(Rstart), R_SetParams(Rstart), R_setStartTime();
-extern void ProcessEvents(void);
-extern int R_ReplDLLdo1();
-
-static void my_onintr(int sig)
-{
- UserBreak = 1;
-}
-
-//extern Rboolean R_LoadRconsole;
static char *RAPIinitialize(void) {
- structRstart rp;
- Rstart Rp = &rp;
- char Rversion[25], *RHome;
-
- snprintf(Rversion, 25, "%s.%s", R_MAJOR, R_MINOR);
- if(strncmp(getDLLVersion(), Rversion, 25) != 0) {
- return "Error: R.DLL version does not match";
- }
-
- R_setStartTime();
- R_DefParams(Rp);
- if((RHome = get_R_HOME()) == NULL) {
- return "R_HOME must be set in the environment or Registry";
- }
- Rp->rhome = RHome;
- Rp->home = getRUser();
- Rp->CharacterMode = LinkDLL;
- //Rp->ReadConsole = w;
- Rp->WriteConsole = writeConsole;
- //Rp->CallBack = myCallBack;
- //Rp->ShowMessage = askok;
- //Rp->YesNoCancel = askyesnocancel;
- //Rp->Busy = myBusy;
-
- Rp->R_Quiet = TRUE;
- Rp->R_Interactive = TRUE;
- Rp->RestoreAction = SA_RESTORE;
- Rp->SaveAction = SA_NOSAVE;
- R_SetParams(Rp);
- //R_set_command_line_arguments(argc, argv);
-
- FlushConsoleInputBuffer(GetStdHandle(STD_INPUT_HANDLE));
-
- signal(SIGBREAK, my_onintr);
- //GA_initapp(0, 0);
- //R_LoadRconsole = FALSE;
- setup_Rmainloop();
-
- return RAPIinstalladdons();
-}
-
-void initRinside() {
- /* disable stack checking, because threads will thow it off */
- R_CStackLimit = (uintptr_t) -1;
+ return "Sorry, no R API on Windows";
}
#endif
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list